smbclient -L //192.168.1.10 -NLists available shares on the target using a null session (no authentication).
An FTP-like client for SMB/CIFS shares: list shares, browse, upload and download files, with or without credentials.
sudo apt install smbclientsmbclient //192.168.1.10/share -NConnects to a specific share using a null session.
Example
smbclient //192.168.1.10/public -Nsmbclient //192.168.1.10/share -U username%passwordConnects to a share providing both username and password inline.
Example
smbclient //192.168.1.10/c$ -U admin%SecurePass123smbclient //dc.example.local/share -W DOMAIN -U userConnects to a share authenticating against a specific Windows domain or workgroup.
Example
smbclient //192.168.1.5/files -W CORP -U john.doesmbclient //192.168.1.10/share -A authfile.txtUses a file containing username, password, and domain for authentication to avoid CLI logging.
Example
smbclient //192.168.1.10/finance -A creds.txtsmbclient //hostname/share -I 192.168.1.10Connects to a hostname but overrides the destination IP address (useful for DNS spoofing/testing).
Example
smbclient //fileserver/docs -I 192.168.1.50 -U usersmbclient //192.168.1.10/share -n NETBIOS_NAMESets the NetBIOS name of the client source machine during the handshake.
Example
smbclient //192.168.1.10/share -n KALI_BOX -U usersmbclient //192.168.1.10/share -m SMB2Forces the client to use the SMB2 protocol version max.
Example
smbclient //192.168.1.10/legacy -m SMB2 -U usersmbclient //192.168.1.10/share -m SMB3Forces the client to use the SMB3 protocol version max (often required for newer Windows).
Example
smbclient //192.168.1.10/secure -m SMB3 -U usersmbclient //192.168.1.10/share -m NT1Forces the use of NT1 (SMB1), useful for targeting legacy Windows XP or Server 2003 systems.
Example
smbclient //192.168.1.10/ancient -m NT1 -U usersmbclient //192.168.1.10/shareStarts an interactive shell session where you can type commands like ls, get, and put.
Example
smbclient //192.168.1.10/share -U usersmbclient //192.168.1.10/share -c 'ls'Connects, lists the files in the root directory, and disconnects immediately.
Example
smbclient //192.168.1.10/share -U user -c 'ls'smbclient //192.168.1.10/share -c 'get sensitive.docx'Connects and downloads a specific single file non-interactively.
Example
smbclient //192.168.1.10/hr -U user -c 'get payroll.xls'smbclient //192.168.1.10/share -c 'put payload.exe'Connects and uploads a file to the remote share.
Example
smbclient //192.168.1.10/wwwroot -U user -c 'put shell.aspx'smbclient //192.168.1.10/share -c 'mkdir tempdir'Creates a new directory on the remote share.
Example
smbclient //192.168.1.10/share -U user -c 'mkdir hidden'smbclient //192.168.1.10/share -c 'recurse; ls'Toggles recursion to ON and lists all files in the share including subdirectories.
Example
smbclient //192.168.1.10/share -U user -c 'recurse; ls'smbclient //192.168.1.10/share -c 'prompt OFF; recurse ON; mget *'Downloads the entire contents of a share recursively without asking for confirmation per file.
Example
smbclient //192.168.1.10/backup -U user -c 'prompt OFF; recurse ON; mget *'smbclient //192.168.1.10/share -c 'del oldfile.txt'Deletes a specific file from the remote share.
Example
smbclient //192.168.1.10/logs -U user -c 'del error.log'smbclient //192.168.1.10/share -c 'rmdir old_folder'Removes an empty directory from the remote share.
Example
smbclient //192.168.1.10/share -U user -c 'rmdir temp'smbclient //192.168.1.10/share -c 'more readme.txt'Displays the contents of a remote file directly to stdout.
Example
smbclient //192.168.1.10/share -U user -c 'more config.ini'smbclient //192.168.1.10/share -T c backup.tar *Creates a local TAR archive of all files on the remote share directly.
Example
smbclient //192.168.1.10/docs -U user -T c docs_backup.tar *smbclient //192.168.1.10/share -T x restore.tarExtracts a local TAR archive and uploads the files to the remote share.
Example
smbclient //192.168.1.10/docs -U user -T x local_backup.tarsmbclient //192.168.1.10/share -d 5Increases the debug level to 5, showing detailed protocol handshake and error information.
Example
smbclient //192.168.1.10/share -U user -d 5smbclient //192.168.1.10/share -t 60Sets the connection timeout in seconds (useful for slow links or large transfers).
Example
smbclient //192.168.1.10/large_share -U user -t 120smbclient //192.168.1.10/share -gUses grepable output format, useful for parsing results in scripts.
Example
smbclient -L //192.168.1.10 -U user -gsmbclient -M NETBIOS_NAMESends a WinPopup message to the target machine (requires Messenger service).
Example
smbclient -M WIN10-TARGET -U usersmbclient //ipv6-address/share -U userConnects to an SMB share hosted on an IPv6 address.
Example
smbclient //2001:db8::1/share -U usersmbclient //192.168.1.10/IPC$ -c 'q'Connects to IPC$ (Inter-Process Communication) merely to validate access rights or null session capability.
Example
smbclient //192.168.1.10/IPC$ -N -c 'q'smbclient //192.168.1.10/share -c 'getfacl filename'Displays the Access Control List (ACL) and permissions for a specific file (if server supports UNIX extensions).
Example
smbclient //192.168.1.10/share -U user -c 'getfacl confidential.txt'smbclient //192.168.1.10/share -c 'stat filename'Shows file attributes, timestamps, and size information.
Example
smbclient //192.168.1.10/share -U user -c 'stat report.pdf'smbclient //192.168.1.10/share -c 'rename old new'Renames a file on the remote server.
Example
smbclient //192.168.1.10/share -U user -c 'rename draft.txt final.txt'smbclient //192.168.1.10/share -O 'socket options'Sets TCP socket options for performance tuning or stability.
Example
smbclient //192.168.1.10/share -U user -O 'TCP_NODELAY SO_KEEPALIVE'smbclient //192.168.1.10/share -EWrites messages to stderr instead of stdout, keeping stdout clean for data piping.
Example
smbclient //192.168.1.10/share -U user -E -c 'ls'smbclient //192.168.1.10/share -b sizeChanges the transmit/send buffer size (useful for performance tuning on specific networks).
Example
smbclient //192.168.1.10/share -U user -b 16384smbclient -s /etc/samba/smb.confUses a specific local Samba configuration file instead of the default.
Example
smbclient -L //192.168.1.10 -s ./local-smb.confsmbclient //192.168.1.10/share -c 'history'Displays the command history within the smbclient context (mostly useful in interactive mode).
Example
smbclient //192.168.1.10/share -U user -c 'history'smbclient //192.168.1.10/share -c 'volume'Prints the volume serial number of the remote share.
Example
smbclient //192.168.1.10/share -U user -c 'volume'smbclient //192.168.1.10/share -c 'md5 filename'Calculates MD5 hash of a remote file (if supported by server/client extensions).
Example
smbclient //192.168.1.10/share -U user -c 'md5 image.iso'smbclient //192.168.1.10/C$ -U userConnects to the administrative C$ share, typically allowing full filesystem access.
Example
smbclient //192.168.1.10/C$ -U Administrator%Passwordsmbclient //192.168.1.10/ADMIN$ -U userConnects to the ADMIN$ share, often used for remote execution and PsExec-style attacks.
Example
smbclient //192.168.1.10/ADMIN$ -U Administratorsmbclient \\192.168.1.10\share -U userConnects using Windows-style backslashes (must be escaped in shell).
smbclient //192.168.1.10/share -qSuppresses informational messages, useful for scripts expecting clean output.
Example
smbclient //192.168.1.10/share -U user -qsmbclient //192.168.1.10/share -c 'posix'Turns on POSIX path handling to allow case-sensitive filenames if server supports it.
Example
smbclient //192.168.1.10/share -U user -c 'posix'smbclient //192.168.1.10/share -c 'case_sensitive'Toggles case sensitivity for file matching.
Example
smbclient //192.168.1.10/share -U user -c 'case_sensitive'smbclient //192.168.1.10/share -c 'l'Alternative command for 'ls' (list) inside the interactive shell.
Example
smbclient //192.168.1.10/share -U user -c 'l'smbclient //192.168.1.10/print$ -c 'print file.pdf'Uploads and queues a file to be printed on a remote printer share.
Example
smbclient //192.168.1.10/print$ -U user -c 'print document.pdf'smbclient //192.168.1.10/share -c 'logon'Establishes a new logon context (re-authenticates) within the session.
Example
smbclient //192.168.1.10/share -U user -c 'logon'smbclient //hostname/share -R lmhostsSets the name resolution order (e.g., lmhosts, host, wins, bcast).
Example
smbclient //server/share -R wins -U usersmbclient -e //192.168.1.10/shareForces SMB encryption (SMB3) for the connection, protecting data on the wire.
Example
smbclient -e //192.168.1.10/private -U usersmbclient //192.168.1.10/share -c 'du'Displays disk usage for the current share.
Example
smbclient //192.168.1.10/share -U user -c 'du'echo 'ls' | smbclient //192.168.1.10/sharePipes commands directly into smbclient from stdin (alternative to -c).
Example
echo 'ls' | smbclient //192.168.1.10/share -Nsmbclient -L 192.168.1.10 -I 192.168.1.10Enumerates shares when the NetBIOS name is unknown or identical to IP.
Example
smbclient -L 192.168.1.10 -I 192.168.1.10 -Nsmbclient //192.168.1.10/share -D folder -T c archive.tarChanges directory to a subfolder first, then creates a tar archive of its contents.
Example
smbclient //192.168.1.10/share -U user -D 'sub/folder' -T c backup.tarSamba’s MS-RPC client. Queries domain users, groups, password policies and SIDs over SMB, often with a null or low-privilege session.
A wrapper around Samba tools that enumerates users, groups, shares, password policy and OS details from Windows and Samba hosts.
The Swiss-army knife for Windows networks: spray credentials, execute commands and dump secrets across SMB, WinRM, LDAP and MSSQL. NetExec (nxc) is the maintained fork.