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 | $0.00051 | $0.01816 |
| Sonnet 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 7d 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.
- 7d 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 (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 3,631 once invoked, about $0.0005 per session on Opus 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.
Other skills, from other repositories
amsi-bypass
Bypass the Windows Antimalware Scan Interface (AMSI) using memory patching, reflection, and obfuscation techniques. Execute undetected PowerShell, VBScript, JScript, and .NET assemblies in-memory without triggering Microsoft Defender or third-party AV/EDR solutions. Use this skill during Red Team engagements when…
certutil-download-execution
Utilize the native Windows binary certutil.exe to download malicious payloads and optionally decode Base64 encoded files as a Living-off-the-Land (LotL) technique. This skill details how attackers bypass application whitelisting and fetch stage-2 implants.
detecting-fileless-attacks-on-endpoints
Use when detects fileless malware and in-memory attacks that execute entirely in RAM without writing persistent files to disk, evading traditional antivirus. Use when building detections for PowerShell-based attacks, reflective DLL injection, WMI persistence, and registry-resident malware. Activates for requests…
cobalt-strike-malleable-c2
Create and implement Malleable C2 profiles in Cobalt Strike to evade network intrusion detection systems (NIDS/IPS) and endpoint detection architectures. This skill focuses on molding the Beacon's HTTP/HTTPS traffic to resemble legitimate network traffic like Amazon, Google, or jQuery.
hunting-fileless-and-in-memory-threats
Hunts for fileless and in-memory threats by correlating PowerShell script-block logs, encoded-command usage, in-memory loading patterns, and registry-resident payloads from Windows telemetry. Activates for requests to hunt fileless malware, detect in-memory execution, or find registry-resident and reflective-loading…
hunting-wmi-event-subscription-persistence
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 event consumer backdoors…