Sysmon event 20
WmiEvent (WmiEventConsumer activity detected)
Channel: Microsoft-Windows-Sysmon/Operational. Category: WMI.
What it records
Logs the registration of a WMI event consumer (the action that executes when the bound filter's condition fires) recording the consumer name, log, and destination.
Why it matters
The consumer is where the actual malicious payload or command line lives in a WMI persistence chain, making this event especially valuable for recovering what an attacker configured to run.
What triggers it
Rare in normal operation; overwhelmingly associated with WMI-based persistence or fileless execution set up by malware or offensive tooling.
Fields that carry the answer
| Field | What it tells you |
|---|---|
| Name | The name of the WMI consumer: the pivot value for correlating with the matching Event 21 binding. |
| Type | The consumer type, e.g. CommandLineEventConsumer or ActiveScriptEventConsumer, which tells you what kind of action will execute when the subscription fires. |
| Destination | The actual command line or script that will run when the subscription fires. This is where the real payload lives, making it the single most important field in the WMI persistence chain. |
| Operation | Whether the consumer was created, modified, or deleted, which mirrors the same anti-forensic-cleanup signal as in Event 19. |
In practice
An Event 20 record shows Name="SCM Event Log Consumer", Type=CommandLineEventConsumer, and Destination powershell.exe -nop -w hidden -enc <base64>. Destination is the actual payload that will run whenever the bound filter's condition fires, giving the analyst the full command line without needing to touch the WMI repository directly.
Sample record
Wmi consumer: RuleName: - EventType: WmiConsumerEvent UtcTime: 2024-02-11 09:42:04.117 Operation: Created User: CORP\jdoe Name: BotConsumer23 Type: CommandLineEventConsumer Destination: cmd.exe /c powershell.exe -NoProfile -WindowStyle Hidden -EncodedCommand <base64>
ATT&CK techniques
- T1546.003: T1546.003
Sources
Paste a record into Event XML or open a log in EVTX Reader.