CVE-2022-30190 MSDT 代码注入漏洞分析
Windows Troubleshooting Platform (WTP) provides ISVs, OEMs, and administrators the ability to write troubleshooting packs that are used to discover and resolve issues found on the computer
WTP 框架提供了一种自动化 检测/修复 故障的方式。
上图展示了 WTP 的底层结构:
WTP由两个进程组成,Process1 是带UI 的 Troubleshooting Run-time Engine,Process2 用于提供 Windows PowerShell Runtime 环境。
Process2 提供的 PowerShell 运行时环境提供了4条特殊的 PowerShell 命令:Get-DiagInput, Update-DiagReport, Update-DiagRootCause, Write-DiagProgress。
Troubleshooting Pack 运行在Process1 和 Process2 所构建的平台上。
故障排除包 是用户可编程部分,其本质上是一组 针对特定故障的 检测/修复脚本。Process1 的Troubleshooting Run-time Engine 从故障排除包中获取 检测脚本,并交给Process2 运行。Process2 中特殊的 PowerShell 运行时环境提供了4条专用的命令给故障排除包里的脚本使用。
故障排除包的设计基于三个步骤:检测问题(troubleshooting)、解决问题(resolution)和验证解决方案(verification),对应 TS_、RS_、VF_ 三种脚本。
实际上 Process1 就是 msdt.exe ,Process2 则是 sdiagnhost.exe。sdiagnhost.exe 为了给msdt.exe 提供运行脚本的能力,注册了IScriptedDiagnosticHost com接口,相应的com方法就是:RunScript()。
WTP 还提供了一系列的默认故障排除包,可以在 ms-msdt 协议里通过 -id 参数指定。本次漏洞中所使用的 PCWDiagnostic 就是其中之一,用于程序兼容性的故障排除
发表评论