This document outlines many of the security flaws in the Metasploitable 2 image. Currently missing is documentation on the web server and web application flaws as well as vulnerabilities that allow a local user to escalate to root privileges.
After the virtual machine boots, login to the console with username msfadmin and password msfadmin. From the shell, run the ifconfig command to identify the IP address.
From our attack system (Linux, preferably something like Kali Linux), we will identify the open network services using Nmap. The following command line will scan all TCP ports:
nmap -p- [target_ip]
TCP ports 512, 513, and 514 are known as "r" services, and have been misconfigured to allow remote access from any host (a standard ".rhosts + +" situation).
On port 21, Metasploitable2 runs vsftpd. This version contains a backdoor. If a username is sent that ends in the sequence :) (a happy face), the backdoored version will open a listening shell on port 6200.
On port 6667, Metasploitable2 runs the UnrealIRCD IRC daemon. This contains a backdoor triggered by sending the letters "AB" followed by a system command.
The primary administrative user msfadmin has a password matching the username. Additionally, the PostgreSQL service can be accessed with username postgres and password postgres.