A permanent WMI event subscription binding (an __EventFilter bound to a __EventConsumer) was created. Permanent consumers survive reboots and run whenever their trigger fires.
A hallmark fileless persistence and execution technique (used by Turla, FIN groups, and common offensive toolkits). A CommandLineEventConsumer or ActiveScriptEventConsumer bound to a filter runs attacker code on triggers like logon or a time interval. Nearly every 5861 warrants review.
Alert on every 5861. Extract the consumer type and command/script. Allow-list legitimate sources (SCCM, monitoring agents). Correlate with 4688 for the process that created the binding.
ConsumerFilterQueryUser | Tactic | Technique |
|---|---|
| Persistence | Windows Management Instrumentation Event Subscription (T1546.003) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
title: Permanent WMI Event Consumer Created
status: stable
logsource:
product: windows
service: wmi
detection:
sel:
EventID: 5861
condition: sel
level: high
Event
| where EventLog == "Microsoft-Windows-WMI-Activity/Operational" and EventID == 5861 // Permanent WMI event consumer registered
// EventData holds: Consumer, Filter, Query, User
| project TimeGenerated, Computer, RenderedDescription
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Microsoft-Windows-WMI-Activity/Operational" EventCode=5861
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# Permanent WMI event consumer registered — add EventData fields: Consumer, Filter, Query, User`
Permanent WMI event consumer registered. A permanent WMI event subscription binding (an __EventFilter bound to a __EventConsumer) was created. Permanent consumers survive reboots and run whenever their trigger fires.
Event 5861 is written to the Microsoft-Windows-WMI-Activity/Operational channel by Microsoft-Windows-WMI-Activity. Enable/collect the WMI-Activity/Operational channel (on by default) to capture WMI provider and subscription activity.
Event 5861 is associated with: Windows Management Instrumentation Event Subscription (T1546.003).
Alert on every 5861. Extract the consumer type and command/script. Allow-list legitimate sources (SCCM, monitoring agents). Correlate with 4688 for the process that created the binding.