smbclient
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.
| Type | CLI |
| Platform | Kali / Linux |

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)
| Command | What it does |
|---|---|
ls | List 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 |
exit | Quit |
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.
smbclient es un cliente SMB (puerto 445) tipo FTP: permite conectarse a recursos compartidos de Windows/Samba, listar carpetas compartidas, y subir/descargar archivos, todo desde la terminal.
| Tipo | CLI |
| Plataforma | Kali / Linux |

Conectarse a un recurso
smbclient //<IP>/<share> -N # anonimo
smbclient //<IP>/<share> -U <usuario>
Ver carpetas compartidas del servidor
smbclient -L //<IP> -N
smbclient -L //<IP> -U <usuario> # con contraseña si hace falta
Comandos dentro de smbclient (funciona como FTP)
| Comando | Qué hace |
|---|---|
ls | Listar archivos |
get <archivo> | Descargar archivo |
put <archivo> | Subir archivo |
cd <carpeta> | Cambiar de carpeta (remoto) |
lcd <ruta_local> | Cambiar de carpeta local |
!<comando> | Ejecutar un comando en tu máquina local, ej: !pwd |
exit | Salir |
Uso responsable
Estos comandos son para entornos propios o con autorización explícita por escrito (laboratorios, CTF, auditorías contratadas). Usarlos contra infraestructura ajena sin permiso es ilegal en la mayoría de países.