Windows Management Instrumentation (WMI) is a Windows feature for system management and automation via standardized interfaces. Administrators use WMI to query system info, execute commands, and automate tasks remotely. Attackers exploit WMI event subscriptions to achieve stealthy persistence without touching registry keys or startup folders.
WMI event subscription allows payloads to execute automatically when specific triggers occur.
To establish persistence using WMI event subscription, an attacker performs the following three steps:
explorer.exe launches.powershell.exe with a malicious payload.This method is highly stealthy because it blends with normal system activity
Monitor for unusual WMI event subscriptions and activity
Key indicators include:
cmd.exe, powershell.exe, mshta.exe).ROOT\\Subscription).| Event ID | Description | Threat Hunting Notes |
|---|---|---|
| 19 ⭐ | WMI Event Filter Registered | A new WMI event filter was created, possibly used for persistence. |
| 20 ⭐ | WMI Event Consumer Registered | A new WMI event consumer was created, executing scripts or commands. |
| 21 ⭐ | WMI Event Binding Registered | A binding between a filter and consumer was created, finalizing persistence. |