SMB Lateral Movement
After gaining credentials or NT hashes on a compromised host, SMB is the primary protocol for testing access to other machines in the network. Port 445 is almost universally open on Windows hosts, and NTLM authentication means you never need to crack a hash to reuse it.
Identify Reachable SMB Hosts
Before spraying credentials, discover which hosts are accessible over port 445 from your current position:
SMB 10.10.10.10 445 DC01 [*] Windows Server 2019 (name:DC01) (domain:corp.local) (signing:True) (SMBv1:False) SMB 10.10.10.20 445 WEB01 [*] Windows 10.0 Build 19041 (name:WEB01) (domain:corp.local) (signing:False) (SMBv1:False) SMB 10.10.10.30 445 FILE01 [*] Windows Server 2016 (name:FILE01) (domain:corp.local) (signing:False) (SMBv1:False)
Note the signing:True/False output — hosts without SMB signing are also relay candidates.
From a Windows foothold without Kali tools:
Spray Credentials Across Hosts
Test which hosts accept your current credentials. This works with plaintext passwords or NT hashes.
Password spray:
Hash spray (Pass-the-Hash):
Local account spray — try the same local Administrator hash across all hosts. Common when LAPS is not deployed:
SMB 10.10.10.20 445 WEB01 [+] corp.local\jsmith:Password123 (Pwn3d!) SMB 10.10.10.30 445 FILE01 [+] corp.local\jsmith:Password123 SMB 10.10.10.40 445 DEV01 [+] corp.local\jsmith:Password123 (Pwn3d!)
(Pwn3d!) in the output marks every host where the account has local admin access. Those are execution targets.
Hosts without (Pwn3d!) have valid credentials but no admin access — still useful for share enumeration and file access.
Check Share Access on Reachable Hosts
Once you know which hosts accept your credentials, map share access across the network:
smbmap gives a cleaner view of share permissions across multiple hosts:
[+] IP: 10.10.10.30:445 Name: FILE01.corp.local
Disk Permissions Comment
---- ----------- -------
ADMIN$ NO ACCESS Remote Admin
C$ READ, WRITE Default share
Backups READ ONLY
IT READ, WRITE
READ, WRITE on non-default shares or on C$ = drop payloads, read sensitive files, or stage data.
Execute Commands on Reachable Hosts
Once you have confirmed admin access on a target, execute commands remotely. All Impacket tools run from a Linux attacker machine.
Single command without opening a shell:
Interactive shell — wmiexec (quietest, no service created):
Interactive shell — smbexec (no binary on disk, creates temporary service):
Interactive shell — psexec (SYSTEM shell, noisiest — creates service and writes binary):
Prefer wmiexec as the default. Drop to psexec if you need SYSTEM or if wmiexec fails. See SMB Remote Code Execution for detailed comparison.
File Operations Over SMB
Direct file access is useful for dropping payloads on a target without opening a shell, or for reading sensitive data.
Interactive SMB shell from Linux:
# In the smbclient shell: shares use C$ ls Users\Administrator\Desktop\ get Users\Administrator\Desktop\flag.txt put /tmp/payload.exe Windows\Temp\payload.exe
Non-interactive single command:
From a Windows foothold — mount the remote share and operate on it:
Dump Credentials from Newly Compromised Hosts
After gaining access to a new host, dump credentials immediately for the next hop:
Local SAM hashes give you the local admin credentials — spray them with --local-auth for the next hop. LSA secrets often contain service account or cached domain credentials in plaintext.
Pivot Over SMB
If the new host has access to a network segment unreachable from your attacker box, set up a SOCKS proxy through your SMB shell:
Then route further attacks through the tunnel using proxychains:
References
-
psexec, smbexec, wmiexec, smbclient, secretsdump implementations
-
SMB credential spraying, share enumeration, remote execution
-
SMB share enumeration with permission mapping
Was this helpful?
Your feedback helps improve this page.