Enumerate SMB with enum4linux-ng#
enum4linux-ng -A $IPRun nmap SMB scripts#
nmap --script=smb-enum* -p 139,445 $IPTest SMB with NetExec#
netexec smb $IPList shares as null user#
smbclient -N -L //$IP/
netexec smb $IP -u '' -p '' --sharesConnect to a share#
smbclient //$IP/sharename -U $USER --password=$PASS-W $DOMAIN
Mount SMB share locally#
mount -t cifs //$IP/sharename /mnt/smb -o username=user,password=passRecursively download a share#
smbclient //$IP/share -N -c "prompt OFF; recurse ON; mget *"