Note: 139 = NetBIOS is a session layer protocol and service and different from 445 SMB.
Enumeration
Mandatory
If you have no credentials yet:
- Enumerate enum4linux:
enum4linux -a $target - Enumerate shares:
smbmap -r -H $target-u Guestsmbmap -r -H $targetnmap --script smb-enum-shares.nse -p445 $targetsmbclient --no-pass -L //$target - Perform nbtscan to query valid NetBIOS names:
nbtscan -r 10.0.0.0/24 - Perform nmap script scan(s): (! Don’t use all of them, see the nmap script post and chosse promising nmap scripts!)
nmap --script=smb-* -p445 $target
If you have already user credentials:
- Enumerate shares:
smbmap -u L4mpje -p 'bureaulampje' -d WORKGROUP -H $target -R - Execute a command (alternatively with pht-winexe, Impacket tools, see also Windows Command execution):
smbmap -u ariley -p 'pass' -d WORKGROUP -x 'whoami' -H $target
On Windows
- Enumerate open shares to the target dc01:
>net view \\dc01 /all
Optional
- Try other programs for enumeration from the SMB blog post.
- Try to spray passwords.
- If you have access with smbclient, try alternative data streams:
smb: \C.Smith\HQK Reporting> allinfo "Debug Mode Password.txt"
Leave a Reply
You must be logged in to post a comment.