Skip to content
Skillpedia
Analysis & spreadsheets35k · #7960

hunting-for-lateral-movement-via-wmi

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.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

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.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

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

5 new skills a week. 1 minute to read.

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.

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
#7960
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