Skip to content
Skillpedia
Analysis & spreadsheets35k · #5797

hunting-for-lateral-movement-via-wmi

Helps your agent detect lateral movement via WMI. It's useful for investigating remote code execution or persistence through WMI subscriptions.

What it does

This tool looks for suspicious activity indicating someone tried to use WMI to move to other computers on the network. It analyzes event logs to find signs of remote command execution.

When to use it

  • ✓When you suspect an intruder has breached the network and is spreading.
  • ✓When investigating a security incident to understand how it happened.
  • ✓To check if your security systems are catching this type of attack.

Example of what to ask your AI

“Hunt for lateral movement using WMI in event logs.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-lateral-movement-via-wmi/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-lateral-movement-via-wmi/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool examines Windows and Sysmon event records, looking for a program called WmiPrvSE.exe that is starting other dangerous programs like cmd.exe or powershell.exe. It also checks for suspicious configurations that allow an attacker to maintain access.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-lateral-movement-via-wmi

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/hunting-for-lateral-movement-via-wmi/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Hunting for Lateral Movement via WMI

Overview

Windows Management Instrumentation (WMI) is commonly abused for lateral movement via wmic process call create or Win32_Process.Create() to execute commands on remote hosts. Detection focuses on identifying WmiPrvSE.exe spawning child processes (cmd.exe, powershell.exe) in Windows Security Event ID 4688 and Sysmon Event ID 1 logs, along with WMI-Activity/Operational events (5857, 5860, 5861) for event subscription persistence.

When to Use

  • When investigating security incidents that require hunting for lateral movement via wmi
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Windows Security Event Logs with Process Creation auditing enabled (Event 4688 with command line)
  • Sysmon installed with Event ID 1 (Process Creation) configured
  • Python 3.9+ with python-evtx, lxml libraries
  • Understanding of WMI architecture and WmiPrvSE.exe behavior

Steps

Step 1: Parse Process Creation Events

Extract Event ID 4688 and Sysmon Event 1 entries from EVTX files.

Step 2: Detect WmiPrvSE Child Processes

Flag processes where ParentImage/ParentProcessName is WmiPrvSE.exe, indicating remote WMI execution.

Step 3: Analyze Command Line Patterns

Identify suspicious command lines matching WMI lateral movement patterns (cmd.exe /q /c, output redirection to admin$ share).

Step 4: Check WMI Event Subscriptions

Parse WMI-Activity/Operational log for event consumer creation indicating persistence.

Expected Output

JSON report with WMI-spawned processes, suspicious command lines, WMI event subscription alerts, and timeline of lateral movement activity.

FAQ

What is WMI?

WMI is a Windows tool that allows managing computers. Attackers can use it to run commands on other computers without being easily noticed.

What are 'event logs'?

They are like computer diaries that record what happens, including who did what and when. This tool reads these diaries to find suspicious activities.

What is 'lateral movement'?

It's when an attacker, after getting into one computer, tries to move to other computers on the same network to gain more control or steal more information.

Details

Original description by the author

Detects WMI-based lateral movement (e.g. wmic process call create, Win32_Process.Create()) by analyzing Windows Event ID 4688 and Sysmon Event ID 1 for WmiPrvSE.exe spawning suspicious child processes like cmd.exe or powershell.exe, plus WMI-Activity/Operational events 5857/5860/5861 for subscription-based persistence. Use when hunting for remote code execution via WMI or investigating lateral mov

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5797
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills