Skip to content
WETNav
WMIPersistence

Event ID 5861: WMI permanent event subscription registered

Written when a permanent WMI event subscription (a filter bound to a consumer) is registered in the WMI repository. The key event for detecting stealthy WMI persistence.

Channel
Microsoft-Windows-WMI-Activity/Operational
Logged by default
Yes
Written on
Any host
Volume
Low
Provider
Microsoft-Windows-WMI-Activity
Needs a SACL
No

Key fields

Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.

NamespaceNamespace of the subscription, commonly root\subscription
ConsumerThe event consumer, including its type and payload. CommandLineEventConsumer (a command to run) and ActiveScriptEventConsumer (inline VBScript/JScript) are high-signal
QueryThe event filter query (WQL) that triggers the consumer, for example a timer or a process-start condition
PossibleCauseDescriptive text WMI records for the binding
Have one of these events? Paste it into the decoder

Analyst notes

  • 01A permanent subscription persists across reboots and leaves no Run key or Startup file, which makes 5861 one of the few reliable detections for this technique.
  • 02Inspect the Consumer: a CommandLineEventConsumer running powershell/cmd, or an ActiveScriptEventConsumer with inline script, is almost always worth investigating.
  • 03The filter query reveals the trigger (a __InstanceModificationEvent timer, a logon, or a process start); FilterToConsumerBinding ties the two together.
  • 04Legitimate monitoring software (SCCM, some AV) also registers permanent subscriptions; baseline the known-good set in root\subscription.

Pull this event

Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.

Get-WinEvent -LogName 'Microsoft-Windows-WMI-Activity/Operational' -FilterXPath "*[System[(EventID=5861)]]" -MaxEvents 50 |
  Select-Object TimeCreated, Id, MachineName, Message

-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.

Where it shows up

Investigations, attack signals and lateral movement techniques that rely on this event.

ATT&CK mapping

Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.

Common questions

What does Windows event ID 5861 mean?
Written when a permanent WMI event subscription (a filter bound to a consumer) is registered in the WMI repository. The key event for detecting stealthy WMI persistence. It is written to the WMI-Activity Operational log (Microsoft-Windows-WMI-Activity/Operational).
Is event 5861 logged by default?
Yes, a default Windows installation records it.
Where is event 5861 recorded?
In the Microsoft-Windows-WMI-Activity/Operational channel on the any host.

Written when a permanent WMI event subscription (a filter bound to a consumer) is registered in the WMI repository. The key event for detecting stealthy WMI persistence. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.