← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Windows WMI Event Subscription Persistence Dataset

This hunt uses a simulated Windows Sysmon/WMI-Activity dataset (windows_wmi_persist_2022-06-18T101500.json) capturing T1546.003: Windows Management Instrumentation Event Subscription, where an adversary installs a permanent WMI event filter, consumer, and binding so that a malicious script executes automatically on a recurring trigger (e.g., every system startup or every 60 seconds), without any file on disk in a traditional autorun location.

Step 1: Hypothesis Formation

Hypothesis: A __EventFilter, __EventConsumer (typically CommandLineEventConsumer or ActiveScriptEventConsumer), and __FilterToConsumerBinding are created in the WMI repository, where the consumer executes an encoded PowerShell command or script, and the filter query is a recurring timer or logon-triggered condition. Indicators:

Null Hypothesis: Legitimate systems-management software (e.g., SCCM, monitoring agents) uses WMI permanent event subscriptions for its own automation. Invalidate by checking the consumer's process/command against known vendor tooling and confirming via software inventory.

Rationale: WMI persistence is fileless and survives most traditional autorun-location sweeps (Run keys, Startup folder, services), making it a favorite of sophisticated actors; this hunt validates detection via the dedicated WMI-Activity operational log and Sysmon's WmiEvent channel.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (6 shown) confirm a WMI permanent event subscription firing a base64-encoded PowerShell payload every 60 seconds.

Timestamp (UTC)HostEventDetailsIOC/Why Suspicious?
2022-06-18 10:15:02SRV-APP-05Sysmon 19 (WmiEventFilter)Name=SysMonitorFilter; Query=SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_LocalTime'Recurring-trigger IOC: 60-second polling interval - no legitimate one-time admin task uses this pattern; matches known WMI persistence templates.
2022-06-18 10:15:03SRV-APP-05Sysmon 20 (WmiEventConsumer)Name=SysMonitorConsumer; Type=CommandLineEventConsumer; Destination=powershell.exe -nop -w hidden -enc SQBFAFgA...Payload IOC: base64-encoded PowerShell in the consumer command line - a hallmark of fileless WMI-based malware (e.g., historically associated with tools like POWERSTATS/MuddyWater).
2022-06-18 10:15:03SRV-APP-05Sysmon 21 (Filter-to-Consumer Binding)Binds SysMonitorFilter to SysMonitorConsumerCompletes the persistence chain - filter fires, consumer executes.
2022-06-18 10:16:05SRV-APP-05Sysmon 1 (Process Create)WmiPrvSE.exe spawns powershell.exe with the same encoded commandExecution IOC: first actual firing of the persistence mechanism, confirming it is live and functional, 62 seconds after binding.
2022-06-18 10:17:07SRV-APP-05Sysmon 1 (Process Create)Same spawn repeatsSecond firing, ~60 seconds later - confirms the recurring interval is operating as designed.
-SRV-APP-05(software inventory)No SCCM, monitoring agent, or documented automation tool matches this consumer name or command pattern.Legitimacy check IOC: naming (SysMonitor*) mimics legitimate-sounding tooling but has no match in the approved software inventory.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - a fileless WMI permanent event subscription was installed to execute an encoded PowerShell payload every 60 seconds!