Home smbclient
Post
Cancel

smbclient

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

1
smb: \> put FILE 

Navigate

1
smb: \> dir

Change Directory Locally

1
smb: \> lcd LOCAL_DIRECTORY_PATH
This post is licensed under CC BY 4.0 by the author.