security enabled verified high v1.0.0

smbclient

SMB/CIFS client for accessing and managing file shares on Windows systems, part of the Samba suite of interoperability tools.

📋 Live Preview
smbclient -L {target} -U {username}
๐ŸŒ target โ†’ ip ๐ŸŒ username โ†’ user
smbclient -L {target} -U {username}

Sandbox: execFile · Timeout: 60s

Capabilities

security.ad.share.list
security.ad.share.access
security.ad.share.download
security.ad.file.transfer

Parameters

Name Type Required Default Description Aliases
list boolean No List available shares on target -L, --list
no-pass boolean No Do not prompt for password (null session) -N, --no-pass
username string No - Username for SMB authentication -U, --user, --username
password string No - Password for SMB authentication -P, --password
workgroup string No WORKGROUP Workgroup or domain name -W, --workgroup
ip string No - Target IP address -I, --ip
port integer No 445 SMB port number -p, --port
directory string No - Change to initial directory -D, --directory
command string No - Execute SMB command non-interactively -c, --command
max-protocol string No - Maximum SMB protocol version -m, --max-protocol
encrypt boolean No Require SMB encryption -e, --encrypt
debug integer No 0 Debug level (0-10) -d, --debug
O boolean No - Socket options -O, --options
auth_file boolean No - Credentials file --auth-file
s boolean No - Config file path -s, --config
t boolean No - Connection timeout -t, --timeout

Contract

Inputs

network.target.ip

Target IP or hostname

credential.username

Username for SMB authentication

credential.password

Password for SMB authentication

Outputs

security.ad.share.list

List of available SMB shares

file.content

Downloaded file contents

Side effects: network_trafficfilesystem_write

Workflow Edges

Produces

security.ad.share.listfile.content

Consumes

network.target.ipcredential.usernamecredential.password

Resource Profile

ResourceValue
CPUlow
Memory16 MB
Networklow
Disk I/Olow

Examples

List shares with null session

smbclient -L 10.10.10.1 -N

List shares with authenticated session

smbclient -L 10.10.10.1 -U jdoe

Connect to a share and list contents

smbclient //10.10.10.1/C$ -U jdoe -c ls

Download a file from a share

smbclient //10.10.10.1/Shared -U jdoe -c "get confidential.docx"

Upload a file to a share

smbclient //10.10.10.1/Shared -U jdoe -c "put backdoor.exe"

Non-interactive recursive directory listing

smbclient //10.10.10.1/C$/Users -U jdoe -c "recurse;ls"

Documentation

smbclient โ€” SMB/CIFS Client

smbclient is a command-line SMB/CIFS client included in the Samba suite, used to access file shares, printers, and named pipes on Windows systems.

Common Operations

Operation Command
List shares smbclient -L target -U user
Connect to share smbclient //target/share -U user
Download file smbclient //target/share -U user -c "get file"
Upload file smbclient //target/share -U user -c "put file"
Recurse dirs smbclient //target/share -U user -c "recurse;ls"
Null session smbclient -L target -N

Interactive Commands

Once connected, smbclient provides an FTP-like interface: ls, cd, get, put, rm, mkdir, rmdir, recurse, prompt, mask, tar, blocksize, tarmode, setmode, help.

Related Tools

smbmapenum4linux-ngimpacket

References