吉沃运营专员 发表于 2022-2-10 18:06:23

T1546.003 - WMI 事件订阅

一、概念

攻击者可以通过执行由 Windows Management Instrumentation (WMI) 事件订阅触发的恶意内容来建立持久化并提升特权。WMI 可用于安装事件过滤器、提供程序、消费者和在定义的事件发生时执行代码的绑定。可以订阅的事件示例包括时钟时间、用户登录或计算机的正常运行时间。

攻击者可以使用 WMI 的功能来订阅事件并在该事件发生时执行任意代码,从而在系统上提供持久化。攻击者还可能将 WMI 脚本编译成 Windows 管理对象 (MOF) 文件 (扩展名为 .mof),可用于创建恶意订阅。

WMI 订阅执行由 WMI 提供程序主机进程 (WmiPrvSe.exe) 代理,因此可能会导致提升的 SYSTEM 权限。

二、涉及到的组织或恶意软件

adbupd、APT29、APT33、Blue Mockingbird、FIN8、Leviathan、Mustang Panda、PoshC2、POSHSPY、POWERTON、RegDuke、SeaDuke、Turla

三、案例

adbupd

adbupd 使用 WMI 脚本来实现持久化

相关报告:https://download.microsoft.com/download/2/2/5/225BFE3E-E1DE-4F5B-A77B-71200928D209/Platinum%20feature%20article%20-%20Targeted%20attacks%20in%20South%20and%20Southeast%20Asia%20April%202016.pdf

APT29

APT29 使用 WMI 事件订阅来实现持久化

相关报告:


[*]http://www.slideshare.net/MatthewDunwoody1/no-easy-breach-derby-con-2016
[*]https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Operation_Ghost_Dukes.pdf
[*]https://www.microsoft.com/security/blog/2020/12/28/using-microsoft-365-defender-to-coordinate-protection-against-solorigate/
[*]https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/

APT33

APT33 尝试过使用 WMI 事件订阅在受感染主机上实现持久化

相关报告:https://www.microsoft.com/security/blog/2020/06/18/inside-microsoft-threat-protection-mapping-attack-chains-from-cloud-to-endpoint/

Blue Mockingbird

Blue Mockingbird 使用 mofcomp.exe 来建立从 *.mof 文件配置的 WMI 事件订阅持久性机制

相关报告:https://redcanary.com/blog/blue-mockingbird-cryptominer/

FIN8

FIN8 使用 WMI 事件订阅来实现持久化

相关报告:https://businessinsights.bitdefender.com/deep-dive-into-a-fin8-attack-a-forensic-investigation

Leviathan

Leviathan 使用 WMI 来实现持久化

相关报告:https://www.fireeye.com/blog/threat-research/2018/03/suspected-chinese-espionage-group-targeting-maritime-and-engineering-industries.html

Mustang Panda

Mustang Panda 定制的 ORat 工具使用 WMI 事件消费者来保持持久化

相关报告:https://www.secureworks.com/research/bronze-president-targets-ngos

PoshC2

PoshC2 能够使用 WMI 事件在系统上持久化

相关报告:https://github.com/nettitude/PoshC2_Python

POSHSPY

POHSPY 使用 WMI 事件订阅来建立持久化

相关报告:https://www.fireeye.com/blog/threat-research/2017/03/dissecting_one_ofap.html

POWERTON

POWERTON 使用 WMI 进行持久化

相关报告:https://www.fireeye.com/blog/threat-research/2018/12/overruled-containing-a-potentially-destructive-adversary.html

RegDuke

RegDuke 可以使用每次启动名为 WINWORD.EXE 的进程时启动的 WMI 消费者进行持久化

相关报告:https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Operation_Ghost_Dukes.pdf

SeaDuke

SeaDuke 使用 WMI 代码中的事件过滤器在系统启动后不久执行先前释放的可执行文件

相关报告:https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf

Turla

Turla 使用 WMI 事件过滤器和消费者来建立持久化

相关报告:https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/

四、缓解措施


[*]在 Windows 10 上,启用 ASR 规则以防止恶意软件滥用 WMI 来获得持久化;
[*]防止管理员和特权帐户系统之间的凭据重叠;
[*]默认情况下,只允许管理员使用 WMI 进行远程连接,限制允许连接的其他用户,或禁止所有用户远程连接到 WMI;

五、如何检测

监控 WMI 事件订阅条目,将当前 WMI 事件订阅与每个主机的已知良好订阅进行比较。Sysinternals Autoruns 等工具也可用于检测可能是持久化尝试的 WMI 更改。监视新 WMI EventFilter、EventConsumer 和 FilterToConsumerBinding 事件的创建。当创建新的 EventFilterToConsumerBinding 事件时,事件 ID 5861 会记录在 Windows 10 系统上。

监视可用于注册 WMI 持久化的进程和命令行参数,例如 Register-WmiEvent PowerShell cmdlet,以及那些执行订阅 (即从 WmiPrvSe.exe WMI 提供程序主机产生) 产生的进程和命令行参数。

liuming 发表于 2022-2-11 13:38:50

{:5_150:} 优质内容
页: [1]
查看完整版本: T1546.003 - WMI 事件订阅