PowerShell WMI Event Subscription Persistence via New-CimInstance

Finds PowerShell creating WMI __EventFilter and CommandLineEventConsumer objects for event-triggered persistence.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-08-19
Updated
2026-07-31

ATT&CK techniques

Persistence → Priv Esc
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule identifies PowerShell script block content that creates WMI event subscription components using New-CimInstance. It looks for creation of an __EventFilter and a CommandLineEventConsumer under the root/subscription namespace, which can be used by attackers to establish persistence and execute payloads triggered by WMI events. The detection relies on Script Block Logging telemetry containing the relevant parameter strings in the executed PowerShell code.

Related detections9 linkedT1546.003 — drag to rearrange
Malicious WMI Registration - PowerShell (via powershell)
Malicious System Crash Behavior Manipulation - WMImplant - Registry (via registry_event)
Windows WMI Event Consumer with Encoded Payload Containing Suspicious Strings
Windows Process Creation: WMIC.exe ActiveScriptEventConsumer Creation Attempt
Windows Security 4624 Logon for scrcons.exe Indicating Remote WMI ActiveScriptEventConsumers
WMI scrcons.exe Loading Script and WMI DLLs via Image Load (Windows)
Windows WMI Backdoor in Exchange Transport Agent via WMI Event Filter Execution
Windows WMI Event Subscription Creation (Sysmon Event 19/20/21)
Windows WMI Persistence via wbemcons.dll Loaded by WmiPrvSE.exe
PowerShell WMI Event Subscription Persistence via New-CimInstance
Pivot detection · T1546.003 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.