SMB

List of SMB versions and corresponding Windows versions:

  1. SMB1 – Windows 2000, XP and Windows 2003.

  2. SMB2 – Windows Vista SP1 and Windows 2008

  3. SMB2.1 – Windows 7 and Windows 2008 R2

  4. SMB3 – Windows 8 and Windows 2012.

ENUM4LINUX


enum4linux -a $ip
enum4linux -u user_name -p password $ip #enum with user account
enum4linux -U $ip #list usernames
enum4linux -S #list shares
enum4linux -o remote_host #get Os information

NMAP/SMBCLIENT/SMBMAP


#ENUM OS, computer name, domain, workgroup, and current time over the SMB protocol 
nmap -v -p 139,445 --script smb-os-discovery $ip

#LIST SHARES
nmap --script smb-enum-shares -p 139,445 $ip
smbclient -L \\\\$ip\\
smbclient -L \\$ip --option='client min protocol=NT1' #if NT_STATUS_CONNECTION_DISCONNECTED
smbmap -H $ip

#LIST FILES
smbclient //$ip/PATH -c 'recurse;ls'
net view \\dc01 /all
smbmap -H $ip -R $sharename

#CONNECT TO SHARE
smbclient -U '%' -L //$ip
smbclient -U 'guest%' -L //$ip
smbclient \\\\192.168.1.101\\C$
smbclient \\\\192.168.1.101\\C$ --option='client min protocol=NT1'
smbclient \\\\192.168.1.101\\admin$ -U username

DOWNLOAD FILES

MOUNT SHARES LOCALLY

BRUTE FORCE SHARE

SMB Relay - AD

Relay hash to another machine, that allow to gain access.

Require user’s hash to be admin on the target and smb singing must be disabled on the target.

Last updated