MITRE ATT&CK

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.


How Attackers Use WMI for Persistence:

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:

  1. Create an Event Filter:
  2. Create an Event Consumer:
  3. Create a Binding:

This method is highly stealthy because it blends with normal system activity

Detection Methods:

Monitor for unusual WMI event subscriptions and activity

Key indicators include:

Windows Event Logs & Sysmon Event IDs:

Windows Event Logs

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.