Agent skill

Hunting For Persistence Via Wmi Subscriptions

by mukul975 in mukul975/Anthropic-Cybersecurity-Skills

Hunts for adversary persistence via WMI event subscriptions (MITRE T1546.003) by monitoring the creation of WMI event filters, consumers, and filter-to-consumer bindings that trigger malicious code…

Apache-2.0Auto-check passedSecurity

Install Hunting For Persistence Via Wmi Subscriptions

skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-persistence-via-wmi-subscriptions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mukul975/Anthropic-Cybersecurity-Skills hunting-for-persistence-via-wmi-subscriptions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hunting-for-persistence-via-wmi-subscriptions .claude/skills/hunting-for-persistence-via-wmi-subscriptions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hunting-for-persistence-via-wmi-subscriptions
GitHub stars
34k
Token cost
~1.5k tokens
SKILL.md length
417 words
Files
8 (incl. scripts, references, assets)
Skills in repo
644
Repo updated
First seen
Licence
Apache-2.0

At a glance

Hunts for adversary persistence via WMI event subscriptions (MITRE T1546.003) by monitoring the creation of WMI event filters, consumers, and filter-to-consumer bindings that trigger malicious code…

  • Works in 7 steps: Enumerate Existing WMI Subscriptions:… → Monitor WMI Event Creation (Sysmon… → Analyze Consumer Types: Focus on… → …
  • Malicious code execution on system events
  • SKILL.md covers When to Use, Prerequisites, Workflow and Key Concepts, plus 3 more sections
  • Runs Python scripts from its folder

What it does

Hunting For Persistence Via Wmi Subscriptions is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Hunts for adversary persistence via WMI event subscriptions (MITRE T1546.003) by monitoring the creation of WMI event filters, consumers, and filter-to-consumer bindings that trigger malicious code execution on system events. Use when investigating fileless, trigger-based persistence on Windows hosts or auditing WMI repository contents for malicious event subscriptions.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts, reference files and assets (for example `assets/template.md`, `references/api-reference.md` and `references/standards.md`).

It sits in Security. The repository describes itself as: 817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io…. The licence is Apache-2.0.

When your agent uses it

  • Malicious code execution on system events
  • Investigating fileless
  • Trigger-based persistence on Windows hosts
  • Auditing WMI repository contents for malicious event subscriptions

Example prompts

  • “Use the hunting-for-persistence-via-wmi-subscriptions skill to hunt for adversary persistence via WMI event subscriptions (MITRE T1546.003) by…”
  • “/hunting-for-persistence-via-wmi-subscriptions”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Enumerate Existing WMI Subscriptions: Query all permanent WMI event subscriptions on target systems. A clean system typically has very few…
  2. Monitor WMI Event Creation (Sysmon 19/20/21): Sysmon Event 19 captures WmiEventFilter activity, Event 20 captures WmiEventConsumer…
  3. Analyze Consumer Types: Focus on ActiveScriptEventConsumer (runs VBScript/JScript) and CommandLineEventConsumer (executes commands)…
  4. Check Event Filter Triggers: Examine what triggers the subscription. Common malicious triggers include system startup…
  5. Investigate WmiPrvSe.exe Child Processes: When a WMI subscription fires, the action is executed by WmiPrvSe.exe. Hunt for unusual child…
  6. Correlate with MOF Compilation: Detect mofcomp.exe usage which compiles MOF files to create WMI subscriptions programmatically.
  7. Validate and Respond: Confirm malicious subscriptions, remove them, and trace back to the initial infection vector.

What it can do on your machine

Read from SKILL.md and the folder at commit 54a7988. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hunting For Persistence Via Wmi Subscriptions loads about 1.5k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 417 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from mukul975/Anthropic-Cybersecurity-Skills at commit 54a7988, republished under its Apache-2.0 licence (© mukul975). 417 words, ~1,535 tokens.

Download SKILL.mdSave it as .claude/skills/hunting-for-persistence-via-wmi-subscriptions/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
hunting-for-persistence-via-wmi-subscriptions
description
Hunts for adversary persistence via WMI event subscriptions (MITRE T1546.003) by monitoring the creation of WMI event filters, consumers, and filter-to-consumer bindings that trigger malicious code execution on system events. Use when investigating fileless, trigger-based persistence on Windows hosts or auditing WMI repository contents for malicious event subscriptions.
domain
cybersecurity
subdomain
threat-hunting
tags
threat-hunting, wmi-persistence, mitre-t1546-003, event-subscription, windows, endpoint-detection
version
1.0
author
mahipal
license
Apache-2.0
d3fend_techniques
Application Protocol Command Analysis, Network Isolation, Network Traffic Analysis, Client-server Payload Profiling, Platform Monitoring
nist_csf
DE.CM-01, DE.AE-02, DE.AE-07, ID.RA-05
mitre_attack
T1046, T1057, T1082, T1083, T1547

Hunting for Persistence via WMI Subscriptions

When to Use

  • When proactively searching for fileless persistence mechanisms in Windows environments
  • After threat intelligence reports indicate WMI-based persistence by APT groups (APT29, APT32, FIN8)
  • When investigating systems where malware persists across reboots despite cleanup attempts
  • During incident response when standard persistence locations (Run keys, scheduled tasks) are clean
  • When WmiPrvSe.exe is observed spawning unexpected child processes

Prerequisites

  • Sysmon Event ID 19, 20, 21 (WMI Event Filter/Consumer/Binding) enabled
  • Windows Event ID 5861 (WMI activity logging) from Microsoft-Windows-WMI-Activity
  • PowerShell logging enabled (Script Block Logging, Module Logging)
  • WMI repository access for enumeration
  • SIEM platform for event correlation

Workflow

  1. Enumerate Existing WMI Subscriptions: Query all permanent WMI event subscriptions on target systems. A clean system typically has very few or zero permanent subscriptions, making anomalies easy to spot.
  2. Monitor WMI Event Creation (Sysmon 19/20/21): Sysmon Event 19 captures WmiEventFilter activity, Event 20 captures WmiEventConsumer activity, and Event 21 captures WmiEventConsumerToFilter binding.
  3. Analyze Consumer Types: Focus on ActiveScriptEventConsumer (runs VBScript/JScript) and CommandLineEventConsumer (executes commands) -- these are the dangerous types used for persistence.
  4. Check Event Filter Triggers: Examine what triggers the subscription. Common malicious triggers include system startup (Win32_ProcessStartTrace), user logon, or timer-based execution intervals.
  5. Investigate WmiPrvSe.exe Child Processes: When a WMI subscription fires, the action is executed by WmiPrvSe.exe. Hunt for unusual child processes of WmiPrvSe.exe.
  6. Correlate with MOF Compilation: Detect mofcomp.exe usage which compiles MOF files to create WMI subscriptions programmatically.
  7. Validate and Respond: Confirm malicious subscriptions, remove them, and trace back to the initial infection vector.
Show full SKILL.md (159 more words)Show less

Key Concepts

ConceptDescription
T1546.003Event Triggered Execution: WMI Event Subscription
__EventFilterWMI class defining the trigger condition
__EventConsumerWMI class defining the action to perform
__FilterToConsumerBindingLinks a filter to a consumer
ActiveScriptEventConsumerConsumer that runs VBScript or JScript
CommandLineEventConsumerConsumer that executes command lines
WmiPrvSe.exeWMI Provider Host that executes subscription actions
MOF FileManaged Object Format used to define WMI objects

Detection Queries

Splunk -- WMI Subscription Creation via Sysmon
spl
index=sysmon (EventCode=19 OR EventCode=20 OR EventCode=21)
| eval event_type=case(EventCode=19, "EventFilter", EventCode=20, "EventConsumer", EventCode=21, "FilterToConsumerBinding")
| table _time Computer User event_type EventNamespace Name Query Destination Operation
Splunk -- WMI Subscription via Windows Event 5861
spl
index=wineventlog source="Microsoft-Windows-WMI-Activity/Operational" EventCode=5861
| table _time Computer NamespaceName Operation PossibleCause
PowerShell -- Enumerate WMI Subscriptions
powershell
Get-WmiObject -Namespace root\subscription -Class __EventFilter
Get-WmiObject -Namespace root\subscription -Class __EventConsumer
Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding
KQL -- WmiPrvSe.exe Spawning Suspicious Children
kql
DeviceProcessEvents
| where Timestamp > ago(7d)
| where InitiatingProcessFileName =~ "wmiprvse.exe"
| where FileName in~ ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe")
| project Timestamp, DeviceName, FileName, ProcessCommandLine
Sigma Rule
yaml
title: WMI Event Subscription Persistence
status: stable
logsource:
    product: windows
    category: wmi_event
detection:
    selection_consumer:
        EventID: 20
        Destination|contains:
            - 'ActiveScriptEventConsumer'
            - 'CommandLineEventConsumer'
    condition: selection_consumer
level: high
tags:
    - attack.persistence
    - attack.t1546.003

Common Scenarios

  1. APT29 WMI Persistence: Creates an ActiveScriptEventConsumer that executes a VBScript backdoor on system startup, surviving reboots and credential resets.
  2. Turla WMI Backdoor: Uses Win32_ProcessStartTrace filter combined with CommandLineEventConsumer for covert command execution.
  3. FIN8 WMI Timer: Interval-based __IntervalTimerEvent triggering encoded PowerShell downloads every 30 minutes.
  4. MOF-Based Installation: Adversary drops a .mof file and compiles it with mofcomp.exe to silently create persistent subscriptions.

Output Format

Hunt ID: TH-WMI-[DATE]-[SEQ]
Host: [Hostname]
Subscription Name: [Filter/Consumer name]
Filter Query: [WQL trigger condition]
Consumer Type: [ActiveScript/CommandLine]
Consumer Action: [Script content or command]
Binding: [Filter-to-Consumer link]
Created: [Timestamp]
User Context: [SYSTEM/User]
Risk Level: [Critical/High/Medium/Low]

© mukul975, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references, assets) in skills/hunting-for-persistence-via-wmi-subscriptions of mukul975/Anthropic-Cybersecurity-Skills.

  • SKILL.md
  • LICENSE
  • assets/template.md
  • references/api-reference.md
  • references/standards.md
  • references/workflows.md
  • scripts/agent.py
  • scripts/process.py

Open the folder on GitHubat commit 54a7988

Compare with similar skills

Hunting For Persistence Via Wmi Subscriptions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hunting For Persistence Via Wmi Subscriptions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hunting For Persistence Via Wmi Subscriptions this skillmukul975/Anthropic-Cybersecurity-Skills34k—~1.5kAutomated safety check: PassApache-2.0
Kubernetes Network Security Auditkubeshark/kubeshark12k—~7.3kAutomated safety check: NotesApache-2.0
Google Cloud PAM Helpergoogle/skills21k—~3.2kAutomated safety check: PassApache-2.0
Cyberowlaikarimhabush/cyberowl263—~2.5kAutomated safety check: PassMIT
DefectDojo Vulnerability ManagementAgentSecOps/SecOpsAgentKit220—~2.3kAutomated safety check: PassCustom licence
Runtime Provisionernealbridges/VulnHunter678—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Hunts for compromised workloads and malicious traffic in a Kubernetes cluster by sweeping network data through Kubeshark MCP, mapped to MITRE ATT&CK.

    12k GitHub stars~7.3k tokensUpdated yesterday
    SecurityAuto-check: notes
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated yesterday
    SecurityAuto-check passed
  • Cyberowlai

    karimhabush/cyberowl

    Check if recent cybersecurity alerts from 10 international CERTs affect your current project.

    263 GitHub stars~2.5k tokensUpdated today
    SecurityAuto-check passed
  • DefectDojo Vulnerability Management

    AgentSecOps/SecOpsAgentKit

    Aggregates scanner results into DefectDojo, deduplicates findings, tracks remediation SLAs and prepares compliance reports across products and pipelines.

    220 GitHub stars~2.3k tokensUpdated 5 mo ago
    SecurityAuto-check passed
  • Runtime Provisioner

    nealbridges/VulnHunter

    VulnHunter sandbox-depth decision procedure. An agent skill from nealbridges/VulnHunter.

    678 GitHub stars~1.1k tokensUpdated yesterday
    SecurityAuto-check passed
  • Vpn Security Check

    Sergei-thinker/vpn-setup

    Infrastructure security audit for VPN server. An agent skill from Sergei-thinker/vpn-setup.

    189 GitHub stars~1.5k tokensUpdated 5 mo ago
    SecurityAuto-check: notes

More from mukul975/Anthropic-Cybersecurity-Skills

All 644 skills in this repo
  • Campaign Attribution Evidence Analysis

    mukul975/Anthropic-Cybersecurity-Skills

    Weighs infrastructure, TTP, malware code and timing evidence with the Diamond Model and competing hypotheses to reach a confidence-rated attribution.

    34k GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Go Malware Analysis in Ghidra

    mukul975/Anthropic-Cybersecurity-Skills

    Walks through reverse engineering Go-compiled malware in Ghidra: parsing buildinfo and pclntab, recovering stripped function names and extracting dependencies.

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • LNK and Jump List Forensics

    mukul975/Anthropic-Cybersecurity-Skills

    Guides forensic analysis of Windows LNK shortcut files and Jump Lists with LECmd, JLECmd and manual parsing to show file access and program execution.

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Malware Persistence Analysis with Autoruns

    mukul975/Anthropic-Cybersecurity-Skills

    Hunts Windows malware persistence with Sysinternals Autoruns, covering run keys, services, scheduled tasks and drivers, with baseline comparison.

    34k GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • NTFS MFT Deleted File Recovery

    mukul975/Anthropic-Cybersecurity-Skills

    Guides a Windows forensic examination of the NTFS Master File Table to recover deleted-file evidence, build timelines and spot timestomping.

    34k GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Network Covert Channel Analysis

    mukul975/Anthropic-Cybersecurity-Skills

    Detects DNS tunneling, ICMP exfiltration and HTTP-based covert channels in packet captures and DNS logs when hunting for hidden command-and-control traffic.

    34k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Hunting For Persistence Via Wmi Subscriptions

What does Hunting For Persistence Via Wmi Subscriptions do?

Hunts for adversary persistence via WMI event subscriptions (MITRE T1546.003) by monitoring the creation of WMI event filters, consumers, and filter-to-consumer bindings that trigger malicious code…. Hunting For Persistence Via Wmi Subscriptions is an agent skill from mukul975/Anthropic-Cybersecurity-Skills.003) by monitoring the creation of WMI event filters, consumers, and filter-to-consumer bindings that trigger malicious code execution on system events.

When should I use Hunting For Persistence Via Wmi Subscriptions?

Hunting For Persistence Via Wmi Subscriptions fits situations like: malicious code execution on system events; investigating fileless; trigger-based persistence on Windows hosts; auditing WMI repository contents for malicious event subscriptions.

How do I install Hunting For Persistence Via Wmi Subscriptions in Claude Code?

Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-persistence-via-wmi-subscriptions -a claude-code`. Or copy the skill folder (skills/hunting-for-persistence-via-wmi-subscriptions in mukul975/Anthropic-Cybersecurity-Skills) into .claude/skills/hunting-for-persistence-via-wmi-subscriptions in your project. Claude Code loads it when a task matches its description.

How do I install Hunting For Persistence Via Wmi Subscriptions in Codex?

Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-persistence-via-wmi-subscriptions -a codex`. Or copy the skill folder (skills/hunting-for-persistence-via-wmi-subscriptions in mukul975/Anthropic-Cybersecurity-Skills) into .agents/skills/hunting-for-persistence-via-wmi-subscriptions in your project. Codex loads it when a task matches its description.

Can I use Hunting For Persistence Via Wmi Subscriptions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-persistence-via-wmi-subscriptions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hunting-for-persistence-via-wmi-subscriptions, .gemini/skills/hunting-for-persistence-via-wmi-subscriptions, .github/skills/hunting-for-persistence-via-wmi-subscriptions and .opencode/skills/hunting-for-persistence-via-wmi-subscriptions in your project.

What does Hunting For Persistence Via Wmi Subscriptions need to run?

Going by SKILL.md and its folder, Hunting For Persistence Via Wmi Subscriptions needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Hunting For Persistence Via Wmi Subscriptions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hunting For Persistence Via Wmi Subscriptions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Hunting For Persistence Via Wmi Subscriptions use?

Hunting For Persistence Via Wmi Subscriptions is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hunting For Persistence Via Wmi Subscriptions use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Hunting For Persistence Via Wmi Subscriptions?

Skills that share tags, products or a category with Hunting For Persistence Via Wmi Subscriptions: Kubernetes Network Security Audit (kubeshark/kubeshark, 12k stars), Google Cloud PAM Helper (google/skills, 21k stars), Cyberowlai (karimhabush/cyberowl, 263 stars) and DefectDojo Vulnerability Management (AgentSecOps/SecOpsAgentKit, 220 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hunting For Persistence Via Wmi Subscriptions?

mukul975 (a GitHub user) maintains it in mukul975/Anthropic-Cybersecurity-Skills, which has 34,116 GitHub stars. The repository holds 644 skills in this directory. The repository was last updated on August 31, 2026.

Source: mukul975/Anthropic-Cybersecurity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.