-
# TCP
nmap $IP -sV -p 139,445
# UDP
nmap $IP -sU --top-port 25 --open
# Via scripts
nmap $IP -p 445 --script smb-os-discovery
msfconsole
use auxiliary/scanner/smb/smb_version
set rhosts $IP
run
msfconsole
use auxiliary/scanner/smb/smb_enumshares
set rhosts $IP
run
rpcclient -U "" -N $IP
srvinfo
enumdomusers
lookupnames admin
# get OS
enum4linux -o $IP
# get users
enum4linux -U $IP
# get sharelist
enum4linux -S $IP
nmbclient -L $IP -N
nmbclient //$IP/Public -N