smbclient
Tool used to connect to Samba servers - Samba is a Windows-based filesharing protocol.
Basic Syntax
Connect to Server
1$ smbclient //@Target_IP
Connect to specific share
1$ smbclient //@Target_IP/Share
Check Samba Resources
1 $ smbclient -N -L @Target_IP
Download File
1 $ smbclient '//@Target_IP/SHARE' -c 'lcd DOWNLOAD_PATH; cd DIRECTORY; get FILENAME'
Upload File
1 $ smbclient '//@Target_IP/SHARE' -c 'cd REMOTE_PATH; lcd LOCAL_DIRECTORY; put LOCAL_FILENAME'
Mount Share ```bash $ sudo mkdir /mnt/SHARE
$ sudo apt install cifs-utils
$ sudo mount -t cifs //@Target_IP/SHARE /mnt/SHARE
1
2
3
4
5
## Commands
> Download
```bash
smb: \> get FILE
Upload
1smb: \> put FILE
Navigate
1 smb: \> dir
Change Directory Locally
1smb: \> lcd LOCAL_DIRECTORY_PATH