< Metasploitable 2 Walkthrough

Walkthrough for Metasploitable2

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.

Services

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]

Unix Basics

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).

Backdoors

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.

Weak Passwords

The primary administrative user msfadmin has a password matching the username. Additionally, the PostgreSQL service can be accessed with username postgres and password postgres.