Brute-force SMB shares

“Finding open shares is useful to a penetration tester because there may be private files shared, or, if it’s writable, it could be a good place to drop a Trojan or to infect a file that’s already there. Knowing where the share is could make those kinds of tests more useful, except that determining where the share is requires administrative privileges already.” –

Discover network shares
“After a list of shares is found, the script attempts to connect to each of them anonymously, which divides them into “anonymous”, for shares that the NULL user can connect to, or “restricted”, for shares that require a user account.” –

nmap -sS -sV --script smb-enum-shares.nse,smb-os-discovery.nse -p445,139

Use the smb-os-discovery.nse script to discover NetBIOS computer name. The reason for this is that a computer named maria-pc, most likely to have a user named maria, so you can use it during bruteforcing phase.

Brute-Force smb share

use auxiliary/scanner/smb/smb_login
set SMBUser administrator
set PASS_FILE  /root/Documents/passwords_list
set THREADS 10
%d bloggers like this: