139,445 - SMB
Usage
# Download all files without prompting
smb: \> recurse ON
smb: \> prompt OFF
smb: \> mget *
# Mount a share (no authentication)
sudo mount -t cifs //10.10.10.10/target-share /mnt
sudo mount -t cifs - "username='',password=''" //10.10.10.10/my_share /mnt
# Mount a share (with authentication)
sudo mount -t cifs -o username=x7331,password=Pass123! //10.10.10.10/my_share /path/to/mountimpacket-smbserver -smb2support share . -username test -password tes# Map the share
net use z: \\10.10.10.10\share /USER:test test
# Transfer the file(s)
copy my_file z:\# List shares and permissions
smbmap -H 10.10.10.10
# List share's contents
smbmap -H 10.10.10.10 -r my_share
# Spider the share
smbmap -u x7331 -p Passw0rd123! -H 10.10.10.10 -r my_share --depth 3
# Download a file
smbmap -H 10.10.10.10 --download "my_share\target_file"
# Upload a file
smbmap -H 10.10.10.10 --upload target_file "my_share\target_file"# List shares via a null session
smbclient -N -L //10.10.10.10
# Connect to a share
smbclient -U user //10.129.42.253/my_share
smbclient //target/my_share -U "domain\x7331%Password123\!"Enumeration
# Nmap
sudo nmap -sV -p 139,445 -script smb* 10.10.10.10
# MSF - Enumerate SMB's version
msf6 > use auxiliary/scanner/smb/smb_version
# MSF - Enumerate users
msf6 > use auxiliary/scanner/smb/smb_loginLateral Movement
Named Pipes
Windows
PsExec
SharpNoPSExec
NimExec
Registry-based execution
Linux
impacket-psexec
impacket-smbexec
impacket-services
impacket-atexec
Attacks
Passwords
NTLM Theft
NTLM Relay
Vulnerabilities
SMBv2 Negotiation
Last updated