Event ID 20 — WmiEvent (WmiEventConsumer activity detected)
Description
This event logs the registration of WMI consumers.
Message #
Fields #
| Name | Description |
|---|---|
RuleName UnicodeString → string | Custom tag mapped to event, i.e. ATT&CK technique ID |
EventType UnicodeString → string | WMI event type |
UtcTime UnicodeString → string | Time in UTC when event was created |
Operation UnicodeString → string | WMI consumer operation (e.g., Created, Deleted) Known values
|
User UnicodeString → string | User that created the WMI consumer |
Name UnicodeString → string | Name of the consumer created |
Type UnicodeString → string | Type of WMI consumer |
Destination UnicodeString → string | Destination or command executed by the WMI consumer |
Example Event #
{
"system": {
"provider": "Microsoft-Windows-Sysmon",
"guid": "5770385F-C22A-43E0-BF4C-06F5698FFBD9",
"event_source_name": "",
"event_id": 20,
"version": 3,
"level": 4,
"task": 20,
"opcode": 0,
"keywords": 9223372036854775808,
"time_created": "2019-07-19T14:54:58.819106Z",
"event_record_id": 4056,
"correlation": {},
"execution": {
"process_id": 2796,
"thread_id": 1776
},
"channel": "Microsoft-Windows-Sysmon/Operational",
"computer": "MSEDGEWIN10",
"security": {
"user_id": "S-1-5-18"
}
},
"event_data": {
"RuleName": "",
"EventType": "WmiConsumerEvent",
"UtcTime": "2019-07-19 14:54:58.807",
"Operation": "Created",
"User": "MSEDGEWIN10\\IEUser",
"Name": " \"AtomicRedTeam-WMIPersistence-Example\"",
"Type": "Command Line",
"Destination": " \"C:\\\\Windows\\\\System32\\\\notepad.exe\""
}
}
Detection Patterns #
WMI Consumer
Lateral Movement: Exploitation of Remote Services
Security-Auditing Event ID 4624: An account was successfully logged on.OREvent ID 4688: A new process has been created.ORSysmon Event ID 1: Process creationOREvent ID 19: WmiEventOREvent ID 20: WmiEventOREvent ID 21: WmiEvent
1 rule
Kusto Query Language
Detection Rules #
View all rules referencing this event →
Splunk # view in reference
- Detect WMI Event Subscription Persistence source: The following analytic identifies the creation of WMI Event Subscriptions, which can be used to establish persistence or perform privilege escalation. It detects EventID 19 (EventFilter creation), EventID 20 (EventConsumer creation), and EventID 21 (FilterToConsumerBinding creation) from Sysmon logs. This activity is significant because WMI Event Subscriptions can execute code with elevated SYSTEM privileges, making it a powerful persistence mechanism. If confirmed malicious, an attacker could maintain long-term access, escalate privileges, and execute arbitrary code, posing a severe threat to the environment.