root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat smbclient.md
// Active Directory

smbclient

22 Jul 2026 · 2 min read

smbclient is an FTP-style SMB (port 445) client: it connects to Windows/Samba shared resources, lists shared folders, and uploads/downloads files, all from the terminal.

TypeCLI
PlatformKali / Linux
smbclient cheat sheet

Connecting to a share

smbclient //<IP>/<share> -N          # anonymous
smbclient //<IP>/<share> -U <username>

Listing the server's shares

smbclient -L //<IP> -N
smbclient -L //<IP> -U <username>   # with a password if needed

Commands inside smbclient (works like FTP)

CommandWhat it does
lsList files
get <file>Download a file
put <file>Upload a file
cd <folder>Change directory (remote)
lcd <local_path>Change local directory
!<command>Run a command on your local machine, e.g. !pwd
exitQuit

Responsible use

These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.