smbclient

FTP-like client for SMB/CIFS shares.

KaliParrotLinuxlow

pkg: smbclient

smbclient lists and accesses SMB shares, useful for finding open/guest shares and pulling files.

Syntax

smbclient -L //{host} [-U user]

Example

smbclient -L //10.0.0.5 -N

Lists shares on the host using a null session (-N, no password).

Options & flags

What each switch does. Toggle them in the builder below to assemble a command.

-LList the shares on a host.
-U <user>Username (use "" for anonymous).
-NNo password (null session).
-c <ls>Run a command non-interactively (e.g. "ls").
-m SMB2Force a specific SMB protocol version.

Command builder

Tick options (and fill any values) to build a ready-to-copy command.

smbclient //HOST/SHARE

Usage examples

smbclient -L //10.0.0.5 -N

List shares with a null session.

smbclient //10.0.0.5/share -U user

Connect to a share interactively.

Advantages
  • Quickly reveals exposed shares
  • Interactive file access
  • Ships with Samba everywhere
Disadvantages
  • Manual, share-by-share
  • Auth required for protected shares
  • SMB1 quirks on old hosts
Tags
#smb#shares

Official docs: smbclient

Related commands

Frequently asked questions

What is smbclient used for?
smbclient lists and accesses SMB shares, useful for finding open/guest shares and pulling files.
What is an example smbclient command?
A common example is: smbclient -L //10.0.0.5 -N — Lists shares on the host using a null session (-N, no password).
Is smbclient part of Kali Linux?
Yes. smbclient ships with Kali Linux (and Parrot OS). If missing, install it with: sudo apt install smbclient.
What category of security tool is smbclient?
smbclient is a Information Gathering tool with a low-risk profile when run against a live target.

Try recon tools live

Run real scans against a domain you control, stage by stage.

Open the lab →