Hunting wmi event subscription persistence

From meltedinhex/analyst-ai-pack · View interactive version

Hunting wmi event subscription persistence is an AI agent skill from the GitHub repository meltedinhex/analyst-ai-pack. Hunts for malicious WMI permanent event subscription persistence by correlating __EventFilter, CommandLineEventConsumer/ActiveScriptEventConsumer, and FilterToConsumerBinding records from Sysmon Event IDs 19/20/21 or WMI repository exports. Activates for requests to hunt WMI persistence, detect even

How to use this skill

Skill file

Hunting WMI Event Subscription Persistence

When to Use

export and want to find malicious permanent event subscriptions.

Do not use this for transient WMI process calls (T1047 execution) — this targets persistent

EventFilter/EventConsumer subscriptions specifically.

Prerequisites

Workflow

Step 1: Parse and correlate triad records

python scripts/analyst.py hunt wmi_events.csv

Groups filters, consumers, and bindings, and flags consumers whose payload is suspicious

(CommandLineEventConsumer running scripts/encoded commands, ActiveScriptEventConsumer with

inline VBScript/JScript).

Step 2: Assess the trigger

Inspect the __EventFilter query — common malicious triggers fire on logon, time intervals

(__InstanceModificationEvent within), or process start.

Step 3: Confirm maliciousness

Legitimate management subscriptions exist; weight inline scripts, encoded commands, and unusual

consumer names.

Step 4: Operationalize

Write a Sigma/EDR rule for new ActiveScript/CommandLine consumers.

Validation

Pitfalls

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.