Skip to content

SMB

Port : 445

SMB-Client

List shares

Bash
smbclient --no-pass //$TARGET -L

List files

Bash
smbclient --no-pass //$TARGET/$SHARE -c "ls"
# List folder
smbclient --no-pass //$TARGET/$SHARE -c "ls dir/"

Download file

Bash
smbclient --no-pass //$TARGET/$SHARE -c "get file.txt local_file.txt"

Connect to a server with username

Bash
smbclient //$TARGET/$SHARE -U <username>

Interactive mode

Bash
smbclient --no-pass //$TARGET/$SHARE -I"

Sources