smbclient: FTP-like SMB share access
List, browse, and pull files from SMB/CIFS shares.
bash·1 min read··INE Certification
smbclient gives you an FTP-style prompt against an SMB share, which makes it the fastest way to confirm the reach a set of credentials (or an anonymous session) has.
Connecting
smbclient -L //<target_ip>/ -N # anonymous login check
smbclient -L //<target_ip>/ -U <user> # list shares with credentials
smbclient //<target_ip>/<share_name> -U <user> # connect to one specific share
Commands once connected
ls / dir # list contents
get <file> # download
put <file> # upload
cd <dir>
mkdir <dir> / rmdir <dir>
del <file>
recurse # toggle recursive listing (like ls -R)
mget <pattern> / mput <pattern> # bulk download/upload with a mask
exit / quit
Related
- SMB & NetBIOS enumeration: the full workflow these tools plug into
- smbmap: one-shot share and permission checks
- rpcclient: users and groups over RPC
- SMB exploitation: what to do with working credentials