PsExec and SMB Lateral Movement
SMB-based lateral movement is the most common technique in Windows environments. PsExec, its impacket equivalent, and direct SMB share access all use port 445 and valid credentials or hashes. This technique works against any host where the account has local admin access.
Impacket psexec
Impacket's psexec creates a service on the remote host, uploads a binary via SMB, and returns an interactive shell as SYSTEM. It is noisy — a new service is created and event logs record it — but it gives you an immediate SYSTEM shell.
C:\Windows\system32>whoami nt authority\system
Impacket smbexec and wmiexec
Both are quieter alternatives to psexec. smbexec creates a service but does not write a binary to disk. wmiexec uses WMI to run commands and leaves no service artifacts — it is the preferred method when you want to avoid detection.
wmiexec runs commands as the authenticated user, not SYSTEM. If you need SYSTEM-level access on the remote host, use psexec. If you only need to run commands or transfer data, wmiexec is preferable because it generates fewer artifacts.
Sysinternals PsExec
The original PsExec from Sysinternals runs from a Windows foothold. Requires SMB access and admin credentials. Accepts passwords but not hashes directly — use mimikatz pth to inject a hash first, then run PsExec in the spawned process.
SMB file access and share operations
Direct SMB share access lets you read and write files on remote hosts without needing a shell. Use this to drop payloads, read sensitive files, or stage data for exfiltration.
Spraying credentials across multiple hosts
Before moving to a specific target, verify which hosts accept the credentials. nxc makes this fast — it tests the credential against every host in a range and flags where you have admin.
When you have a local Administrator hash, always try --local-auth across the entire subnet first. Many environments reuse the same local Administrator password across workstations, and a single hash can give you access to dozens of hosts. For lateral movement using Kerberos tickets instead of hashes see Pass-the-Hash and Pass-the-Ticket.
References
-
Impacket — GitHubgithub.com/fortra/impacket (opens in new tab)
psexec, smbexec, wmiexec, smbclient implementations
-
PsExec — Microsoft Sysinternalslearn.microsoft.com/en-us/sysinternals/downloads/psexec (opens in new tab)
Official Sysinternals PsExec documentation and download
-
NetExec (nxc) — GitHubgithub.com/Pennyw0rth/NetExec (opens in new tab)
SMB credential testing and lateral movement automation
Was this helpful?
Your feedback helps improve this page.