# On some configuration omitting '-N' will grant access.
smbclient -U '' -L \\\\<IP>
smbclient -U '' -N -L \\\\<IP>
smbclient -U '%' -N -L \\\\<IP>
smbclient -U '%' -N \\\\<IP>\\<Folder>
# Enter a random username with no password and try for anonymous login.
crackmapexec smb <IP> -u 'anonymous' -p ''
crackmapexec smb <IP> -u '' -p ''
crackmapexec smb <IP> -u '' -p '' --shares
Authenticated
# smbmap, list shares and view permissions
smbmap -H <IP> -u <User> -p <Password>
# Connect to share as user and prompt for password
smbclient -U <User> \\\\<IP>\\<Share>
Download Files
# Grab everything in a share
smbclient '\\<IP>\<Share>' -N -c 'prompt OFF;recurse ON; mget *'
# Recursive pattern search for candidate files to download
smbmap -H <IP> -u <User> -p <Password> -d <Domain> -R -A "pass*" --depth 20
smbmap -H <IP> -u <User> -p <Password> -d <Domain> -R -A ".txt|.log|.ps1|.vbs|.zip|.xml"