Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/wmi-event-subscriptionsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/wmi-event-subscriptions)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/wmi-event-subscriptions"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/wmi-event-subscriptions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/wmi-event-subscriptions"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/wmi-event-subscriptions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00101 | $0.03631 |
| Opus 5.5 | $0.00040 | $0.01452 |
| Sonnet 5.5 | $0.00020 | $0.00726 |
| Haiku 4.5 | $0.00010 | $0.00363 |
Grade A, and why
wmi-event-subscriptions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WMI Event Subscriptions (Persistence)
When to Use
- When you have elevated access (Local Admin or SYSTEM) on a Windows target and need persistence that survives reboots while evading standard Autoruns and Scheduled Task enumeration.
- When standard persistence mechanisms (Registry Run keys, Scheduled Tasks) are closely monitored by EDR and you need to live deeper in the OS.
- To execute "fileless" payloads stored entirely within the WMI repository (
C:\Windows\System32\wbem\Repository\OBJECTS.DATA), outside the traditional filesystem. - To attach payloads to conditional triggers — for example, launching a keylogger only when the user opens
keepass.exeorchrome.exe.
When NOT to use: For initial access payload delivery, use phishing-payload-generation. For registry-based persistence, use standard Run key techniques. For service-based persistence that's simpler but noisier, use Scheduled Tasks.
Prerequisites
- Administrative or SYSTEM-level access on the target Windows host
- PowerShell execution (not in Constrained Language Mode)
- Understanding of WQL (WMI Query Language) for custom triggers
- A staged payload (reverse shell, C2 beacon) ready for execution
Workflow
Phase 1: Understanding the WMI Persistence Triad
# WMI Event Subscriptions require three interconnected components stored in
# the WMI repository (C:\Windows\System32\wbem\Repository):
# 1. Event Filter (__EventFilter):
# A WQL query defining WHAT system event to monitor.
# Think of it as: "Watch for the exact moment when [condition] occurs."
# Example: "Trigger when system uptime exceeds 3 minutes after boot."
# 2. Event Consumer (CommandLineEventConsumer or ActiveScriptEventConsumer):
# The malicious ACTION to execute when the filter's condition is met.
# Think of it as: "When triggered, run this hidden PowerShell beacon."
# Types:
# - CommandLineEventConsumer → executes a command line (most common)
# - ActiveScriptEventConsumer → executes VBScript/JScript inline
# - LogFileEventConsumer → writes to a log (useful for staging)
# - SMTPEventConsumer → sends email (rare in attacks)
# 3. FilterToConsumerBinding (__FilterToConsumerBinding):
# The LINK that marries a specific Filter to a specific Consumer.
# Without this binding, the Filter watches and Consumer waits, but
# nothing connects them. This is what activates the persistence.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 298 lines · 101 tokens per session scan A 886c7de05373
wmi-event-subscriptions is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (26 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 3,631 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
wmi-event-subscriptions compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| wmi-event-subscriptionsakashrpatil/awesome-offensive-security-skills | Skill | 26 | 7mo ago | Apache-2.0 | A | 101 | Claude Code |
| amsi-bypassShulkwiSEC/bb-huge | Skill | 27 | 4mo ago | MIT | A | 93 | Claude Code, Codex |
| certutil-download-executionShulkwiSEC/bb-huge | Skill | 27 | 4mo ago | MIT | A | 61 | Claude Code, Codex |
| detecting-fileless-attacks-on-endpointsxalgorix/xalgorix | Skill | 1.5k | yesterday | Apache-2.0 | A | 86 | Claude Code, Codex |
| hunting-fileless-and-in-memory-threatsmeltedinhex/analyst-ai-pack | Skill | 25 | 4d ago | Apache-2.0 | A | 72 | Claude Code, Codex |
| hunting-wmi-event-subscription-persistencemeltedinhex/analyst-ai-pack | Skill | 25 | 4d ago | Apache-2.0 | A | 83 | Claude Code, Codex |
| detecting-fileless-attacks-on-endpointsoyi77/1ai-skills | Skill | 19 | today | MIT | A | 87 | Claude Code |