Attack: SSH credentials cracked via Metasploit’s ssh_login. Defense: detect the success in logs, reset/disable, and harden SSH to keys-only.
Building on Lab 1, SSH (port 22) is exposed on the NAS host. A weak user password allows a successful brute-force using Metasploit’s auxiliary/scanner/ssh_login. On defense, authentication logs reveal the success; the account is secured and SSH is hardened.
auxiliary/scanner/ssh_login.
With a BSD shell obtained, upgrade to Meterpreter using the post module post/multi/manage/shell_to_meterpreter.
getuid / sysinfo confirm context.Review /var/log/auth.log (or platform equivalent). Look for a sequence of failures followed by a success.
Reset the compromised password and temporarily disable interactive SSH access for the account while IR proceeds.
Move to key-based authentication and disable password auth for SSH to prevent brute-force success.
Additional options: rate-limit via firewall, fail2ban-style lockouts, and limiting SSH to trusted management networks.