Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2022-30190 — 对CVE-2022-30190(Follina MSDT漏洞)的全面分析,包含IOCs、针对SIEM/EDR的检测规则、YARA签名、缓解脚本以及从防御者视角的教育性质漏洞利用剖析。 | Kitploit
工具/GitHubGitHub/gyaansastra/cve-2022-30190
危害指标 (IOC) 管理漏洞分析漏洞利用取证分析恶意软件分析威胁情报学习与教育事件响应
GitHubgyaansastra/cve-2022-30190

CVE-2022-30190

对CVE-2022-30190(Follina MSDT漏洞)的全面分析,包含IOCs、针对SIEM/EDR的检测规则、YARA签名、缓解脚本以及从防御者视角的教育性质漏洞利用剖析。

查看仓库
2224年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2022-30190

此仓库从 Defender 角度介绍 Follina MSDT 漏洞

目录

  • 关于
  • 时间线
  • 理解漏洞利用
  • IOC 列表
  • 检测策略
  • 测试与研究
  • 缓解方案
  • 参考链接

关于

该漏洞是 Microsoft Windows 支持诊断工具 (MSDT) 的远程代码执行漏洞,由 crazyman(Shadow Chaser Group 成员)报告。Microsoft 现将其追踪为 CVE-2022-30190。该缺陷影响所有仍接收安全更新的 Windows 版本(Windows 7+ 及 Server 2008+)。

正如安全研究员 nao_sec 所发现,威胁行为者利用该漏洞通过 MSDT 执行恶意 PowerShell 命令,Microsoft 将其描述为打开或预览 Word 文档时的任意代码执行 (ACE) 攻击。

"成功利用此漏洞的攻击者可以以调用应用程序的权限运行任意代码," Microsoft 解释道。

时间线

  • 2022年4月12日 — APT 狩猎组织 Shadowchasing1 的领导者首次向 Microsoft MSRC 报告。这是一份针对俄罗斯的野外真实漏洞利用,主题伪装成俄罗斯求职面试。
  • 2022年4月21日 — Microsoft MSRC 关闭了工单,称其非安全问题(需要说明的是,msdt 在宏禁用的情况下执行本身就是一个问题)。
  • 2022年5月?? — Microsoft 可能尝试修复此问题,或在 Office 365 Insider 频道中偶然修复了它,但未记录 CVE 或在任何地方记载。其他产品仍然存在漏洞。
  • 2022年5月27日 — 安全厂商 Nao 发布了一份来自白俄罗斯的上传文档推文,这也是一个野外攻击。
  • 2022年5月27日 — 再次报告给 MSRC。
  • 2022年5月29日 — Andy Ful 确认这是一个公开的零日漏洞,因为它仍然能在 Office 365 半年频道、本地 Office 版本上运行,并且 EDR 产品未能检测到。

理解漏洞利用

  • 您可以参考 Huntress 博客 这里 来了解此漏洞利用的完整工作原理。
  • 观看此 视频 来理解漏洞利用及其修复方法。

IOC 列表

  • 主对象 - 05-2022-0438.doc
    • sha256 4a24048f81afbe9fb62e7a6a49adbd1faf41f266b5f9feecdceb567aec096784
    • sha1 06727ffda60359236a8029e0b3e8a0fd11c23313
    • md5 52945af1def85b171870b31fa4782e52
  • 释放的可执行文件
    • sha256 C:\Users\admin\AppData\Local\Temp\SDIAG_ecb8c0a2-7a1e-4b6c-8ae0-2245f03bcc15\DiagPackage.dll 3218488d62cb0858101d2ec63ec73a032bc9787f5f87cb46abbea4477c97b16f
    • sha256 C:\Users\admin\AppData\Local\Temp\SDIAG_ecb8c0a2-7a1e-4b6c-8ae0-2245f03bcc15\en-US\DiagPackage.dll.mui c6d837ec0850e22c83b400fcded1791a2f4f99f0c56d6fc7d93e92a8b72c098d
    • sha256 C:\Users\admin\AppData\Local\Temp\r5qxr4ie.dll aa967ae9f6d80bdbd0f315defa17aaee0e756e7e2ad0e5261d8254bc0af1cc02
    • sha256 C:\Users\admin\AppData\Local\Temp\t52wyhbe.dll daf716cbe8810085251e6ef1e39869a9e61d929fac12ea5684c3b2caf993666b
    • sha256 C:\Users\admin\AppData\Local\Temp\qtwoghs1.dll f5361b6c9db8ac25433ae21f9a7b6490cc372ce2b1f802e2b06d5b904ce97109
  • DNS 请求
    • 域名 www[.]xmlformats[.]com
  • 连接
    • ip 141.105.65.149
    • ip 20.42.65.85
    • ip 13.107.42.16
  • HTTP/HTTPS 请求
    • url hxxps://www[.]xmlformats[.]com/office/word/2022/wordprocessingDrawing/
    • url hxxps://www[.]xmlformats[.]com/office/word/2022/
    • url hxxps://www[.]xmlformats[.]com/office/word/2022/wordprocessingDrawing/RDF842l[.]html

检测策略

  • 进行威胁狩猎时,您可以在此处找到 Sigma 规则 HERE

  • 以下是可以进一步调整的检测规则。感谢 Bala Ganesh。完整文章可在此处找到 HERE

  • MS Defender:

root@kitploit:~
DeviceProcessEvents | where ((ProcessCommandLine contains "WINWORD.EXE") and (ProcessCommandLine contains "msdt.exe") and (ProcessCommandLine contains "sdiagnhost.exe" or ProcessCommandLine contains "csc.exe" or ProcessCommandLine contains "PCWDiagnostic" or ProcessCommandLine contains "IT_ReBrowserForFile" or ProcessCommandLine contains "IT_BrowserForFile" or ProcessCommandLine contains "conhost.exe"))
  • Splunk:
root@kitploit:~
[Doc Malware]
alert.severity = 2
description = Detection (Rule ID: 74566a6a66aaasdq2ed)
cron_schedule = 0 * * * *
disabled = 1
is_scheduled = 1
is_visible = 1
dispatch.earliest_time = -60m@m
dispatch.latest_time = now
search = (source="WinEventLog:*" AND (CommandLine="*WINWORD.EXE*") AND (CommandLine="*msdt.exe*") AND (CommandLine="*sdiagnhost.exe*" OR CommandLine="*csc.exe*" OR CommandLine="*PCWDiagnostic*" OR CommandLine="*IT_ReBrowserForFile*" OR CommandLine="*IT_BrowserForFile*" OR CommandLine="*conhost.exe*"))
alert.suppress = 0
alert.track = 1
  • Qradar:
root@kitploit:~
SELECT UTF8(payload) from events where LOGSOURCETYPENAME(devicetype)='Microsoft Windows Security Event Log' and ("Process CommandLine" ilike '%WINWORD.EXE%') and ("Process CommandLine" ilike '%msdt.exe%') and ("Process CommandLine" ilike '%sdiagnhost.exe%' or "Process CommandLine" ilike '%csc.exe%' or "Process CommandLine" ilike '%PCWDiagnostic%' or "Process CommandLine" ilike '%IT_ReBrowserForFile%' or "Process CommandLine" ilike '%IT_BrowserForFile%' or "Process CommandLine" ilike '%conhost.exe%')
  • GrayLog
root@kitploit:~
(CommandLine.keyword:*WINWORD.EXE* AND CommandLine.keyword:*msdt.exe* AND CommandLine.keyword:(*sdiagnhost.exe* *csc.exe* *PCWDiagnostic* *IT_ReBrowserForFile* *IT_BrowserForFile* *conhost.exe*))
Sumologic
(_sourceCategory=*windows* AND (CommandLine = "*WINWORD.EXE*") AND (CommandLine = "*msdt.exe*") AND (CommandLine = "*sdiagnhost.exe*" OR CommandLine = "*csc.exe*" OR CommandLine = "*PCWDiagnostic*" OR CommandLine = "*IT_ReBrowserForFile*" OR CommandLine = "*IT_BrowserForFile*" OR CommandLine = "*conhost.exe*"))
  • Elastic KQL:
root@kitploit:~
(process.command_line:*WINWORD.EXE* AND process.command_line:*msdt.exe* AND process.command_line:(*sdiagnhost.exe* OR *csc.exe* OR *PCWDiagnostic* OR *IT_ReBrowserForFile* OR *IT_BrowserForFile* OR *conhost.exe*))

Brent Murphy 描述的以下查询也可应用 HERE

root@kitploit:~
process where event.type in ("start" , "process_created") and (process.pe.original_file_name : "msdt.exe" or process.name : "msdt.exe") and (process.parent.pe.original_file_name : ("winword.exe", "excel.exe", "outlook.exe", "powerpnt.exe") or process.parent.name : ("winword.exe", "excel.exe", "outlook.exe", "powerpnt.exe"))
  • 你可以使用 Cortex XDR 中的 XQL 搜索来狩猎此攻击:了解更多 HERE
root@kitploit:~
# office processes spawning msdt.exe

config case_sensitive = false timeframe = 30d
| dataset = xdr_data
| filter event_type = ENUM.PROCESS and action_process_image_command_line contains "msdt.exe" and actor_process_image_name in ("winword.exe", "powerpnt.exe", "excel.exe", "msaccess.exe","visio.exe","onenote.exe","powershell.exe")
| fields agent_hostname , action_process_image_command_line , action_process_image_path , actor_process_command_line , actor_process_image_path , causality_actor_process_image_path

# msdt.exe execution with suspicious argument

config case_sensitive = false timeframe = 30d
| dataset = xdr_data
| filter event_type = ENUM.PROCESS and action_process_image_command_line contains "msdt.exe" and
action_process_image_command_line contains "it_browseforfile"
| fields agent_hostname , action_process_image_command_line , action_process_image_path , actor_process_command_line , actor_process_image_path , causality_actor_process_image_path
  • 除了狩猎行为之外,查询注册表项 HKEY_USERS*SID\SOFTWARE\Microsoft\Office\16.0\Common\Internet\Server Cache* 并进行大规模分析也很有用!参考完整帖子 HERE
  • Velociraptor 创建了一个检测逻辑 HERE 来识别 Office Internet Server Cache 注册表键值,从而识别可能来自恶意打开的 Office 文档的 C2 URL。
  • Joe Security 开发的 YARA 规则可在此处找到 HERE
  • Crowdstrike 查询可按如下方式执行:
root@kitploit:~
index=main (ProcessRollup2 OR SyntheticProcessRollup2 OR ProcessBlocked*) ParentBaseFileName IN ("OUTLOOK.EXE","WINWORD.EXE","EXCEL.EXE") CommandLine="*msdt.exe*"
| table ComputerName ParentBaseFileName CommandLine FileName
  • 执行时会生成 "%localappdata%\Diagnostics" 和 "%localappdata%\ElevatedDiagnostics"(对于提权实例)中的 "PCW.debugreport.xml" 文件,其中包含 payload。查看 HERE
  • 当前的概念验证迭代会从 Microsoft Office 应用程序调用 msdt.exe。Crowdstrike Falcon 的通用狩猎查询可在此处找到:
root@kitploit:~
index=main sourcetype=ProcessRollup* event_simpleName=ProcessRollup2
| search ParentBaseFileName IN (winword.exe, excel.exe, powerpnt.exe, outlook.exe) 
| search FileName=msdt.exe
| table _time, aid, ComputerName, UserName, UserSid_readable, ParentBaseFileName, FileName, CommandLine
| lookup local=true aid_master aid OUTPUT AgentVersion, Version, MachineDomain, OU, SiteName
  • 为了进一步分析和基线化你环境中 msdt.exe 的正常使用,可以在 Crowdstrike Falcon 上使用以下查询:
root@kitploit:~
index=main sourcetype=ProcessRollup* event_simpleName=ProcessRollup2
| search FileName=msdt.exe
| eval FileName=lower(FileName)
| eval ParentBaseFileName=lower(ParentBaseFileName)
| stats dc(aid) as endpointCount, count(aid) as executionCount by FileName, ParentBaseFileName
| sort -executionCount
  • Elastic Security 团队更新了 SIEM 的现有规则,并为 msdt.exe 作为 lolbin 添加了新规则。查看检测 规则1 和 规则2
  • 如果你使用 MS Sentinel,可以使用以下查询:
root@kitploit:~
#Detects the exploitation of Follina Microsoft Code Execution vulnerability

SecurityEvent 
| where EventID==4688 
| where ParentProcessName has_any ('winword.exe','excel.exe','outlook.exe') 
| where NewProcessName contains "msdt.exe" or CommandLine contains "msdt.exe"
| project TimeGenerated, NewProcessId, NewProcessName, ParentProcessName, CommandLine, EventID, Activity, Computer

#The below query could return false-positives please verify the output and modify the query according to your environment.

SecurityEvent 
| where EventID==4688 
| where ParentProcessName has_any ('sdiagnhost.exe', 'msdt.exe')
//| where NewProcessName contains "powershell" or NewProcessname contains "cmd.exe"  //optional: you can include this line for directly finding powershell or cmd process spawns
| project TimeGenerated, NewProcessId, NewProcessName, ParentProcessName, CommandLine, EventID, Activity, Computer

测试与研究

⚠⚠请在研究学习目的下才使用以下内容

  • 利用附带的 样本
  • 利用 John Hammond 创建的出色代码和平台 HERE
  • 武器化的 CVE-2021-40444 可在此处找到 HERE
  • 利用 Cas van Cooten 创建的 POC HERE

缓解方案

  • 删除 ms-msdt 的协议处理程序很可能是最安全的缓解方式,直到 Microsoft 发布官方回应。我们尚未在大规模企业环境中测试此方法,因此广泛禁用协议处理程序可能会产生一些副作用。然而,考虑到成功利用的后果(任意代码执行),这是一种合理的基于风险的方法(至少在打开 Office 文档的系统上)。删除协议处理程序只需在提升的命令提示符下执行以下命令:
root@kitploit:~
reg delete HKEY_CLASSES_ROOT\ms-msdt /f

***请注意,在删除之前应备份此键的内容,以便在补丁可用时将其合并回注册表。

  • 你可以使用以下 PowerShell 脚本来实现注册表修改。感谢 Kelvin Tegelaar
root@kitploit:~
$ENV:ActivateWorkaround = "Yes"
if($ENV:ActivateWorkaround -eq "Yes") {
    New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR
    Set-Item -Path "HKCR:\ms-msdt" -Value "URL:ms-msdt_bak"
    Rename-Item -Path "HKCR:\ms-msdt" -newName "ms-msdt_bak"
} else {
    New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR
    Rename-Item -Path "HKCR:\ms-msdt_bak" -newName "ms-msdt"

    Set-Item -Path "HKCR:\ms-msdt" -Value "URL:ms-msdt"
}

  • 教育你的用户始终报告任何包含附件的电子邮件,并且不要打开它。此漏洞甚至只需悬停即可利用。因此最终用户必须保持警惕。
  • 如果环境中使用了 Microsoft Defender 的 攻击面减少 (ASR) 规则,启用“阻止所有 Office 应用程序创建子进程”规则(阻止模式)将阻止此漏洞利用。但是,如果尚未使用 ASR,建议先在审核模式下运行该规则并监控结果,以确保对最终用户没有不利影响。

参考链接

  • https://thehackernews.com/2022/05/watch-out-researchers-spot-new.html
  • https://reaqta.com/2022/05/threat-analysis-msdt-exploit-with-maldocs/
  • https://www.joesandbox.com/analysis/636202/0/html
  • https://www.bleepingcomputer.com/news/microsoft/microsoft-shares-mitigation-for-office-zero-day-exploited-in-attacks/
  • https://nakedsecurity.sophos.com/2022/05/31/mysterious-follina-zero-day-hole-in-office-what-to-do/
  • https://www.theregister.com/2022/05/30/follina_microsoft_office_vulnerability/
  • https://msrc-blog.microsoft.com/2022/05/30/guidance-for-cve-2022-30190-microsoft-support-diagnostic-tool-vulnerability/
  • https://unit42.paloaltonetworks.com/cve-2022-30190-msdt-code-execution-vulnerability/
下载工具