> For the complete documentation index, see [llms.txt](https://tenaka.gitbook.io/pentesting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tenaka.gitbook.io/pentesting/enumeration/smb/smbclient.md).

# smbclient

smbclient -L 10.0.0.1

#### #Null session

smbclient -N -L 10.0.0.1

\#SMB Versions

-m SMB2

-m SMB3

#### #list content of shares

smbclient //10.0.0.1/share -c 'ls'

#### Try&#x20;

smbclient //10.0.0.1/share

smb:&#x20;

#### #connect to share with credentials

smbclient //10.0.0.1/share -U domain/username%Password1234

#### #copy file eg root.txt from victim to attacking host&#x20;

get root.txt          #will get copied to dir that smbclient was lunched from

\#Recurse and mass copy

smb:\\> mask ""

smb:\\> Prompt OFF

smb:\\> recurse ON

smb:\\> mget \*

####

#### #Mount the share

mount -t cifs //10.0.0.1/share /mnt
