This document contains the chronological notes taken during the penetration test of the Metasploitable2 virtual machine.
The objective of this assessment was to discover exposed services, identify vulnerabilities, exploit them where applicable, and document the findings.
| Machine | IP Address |
|---|---|
| Kali Linux | 192.168.29.128 |
| Metasploitable2 | 192.168.29.130 |
The first step was identifying active hosts and discovering exposed services.
Initial scan:
nmap -Pn -sS -sV -sC -O -p- 192.168.29.130The scan identified numerous vulnerable services including:
- FTP
- SSH
- Telnet
- SMTP
- DNS
- HTTP
- SMB
- NFS
- MySQL
- PostgreSQL
- UnrealIRCd
- Tomcat
- DistCC
- Java RMI
- ProFTPD
Each service was then assessed individually.
Each discovered service was enumerated to identify:
- Software version
- Authentication mechanisms
- Available shares
- Exported resources
- Web applications
- Running services
- Database contents
Enumeration tools included:
- Nmap NSE
- Enum4linux
- smbclient
- rpcinfo
- showmount
- Dig
- Nikto
- Gobuster
- Netcat
The following attack techniques were successfully demonstrated.
- vsftpd Backdoor
- Samba username map script
- DistCC RCE
- UnrealIRCd Backdoor
- ProFTPD Backdoor
- Tomcat WAR Deployment
- Bindshell
Successful authentication was achieved against:
- SSH
- Telnet
- MySQL
- PostgreSQL
- Tomcat Manager
The assessment identified insecure configurations including:
- Anonymous NFS exports
- Exposed Java RMI Registry
- Public rpcbind service
- Information disclosure through DNS
- Web application exposure
Following successful compromise, the following verification steps were performed when applicable:
whoami
id
hostname
pwd
uname -aDatabase services were verified using native SQL commands, while file-sharing services were validated through mounted shares and accessible resources.
| Category | Examples |
|---|---|
| Remote Code Execution | vsftpd, Samba, DistCC, UnrealIRCd, Tomcat |
| Weak Credentials | SSH, Telnet, MySQL, PostgreSQL |
| Misconfiguration | NFS, rpcbind, Java RMI |
| Information Disclosure | DNS, HTTP |
Throughout this assessment several important penetration testing concepts were reinforced.
- Enumeration is often more valuable than exploitation.
- Weak credentials remain a common attack vector.
- Misconfigurations frequently lead to compromise.
- Not every exposed service is directly exploitable.
- Post-exploitation validation is essential to demonstrate impact.
- Accurate documentation is as important as successful exploitation.
The Metasploitable2 laboratory provides an excellent environment for learning penetration testing methodologies.
This assessment covered the complete workflow from reconnaissance through exploitation, impact assessment, and mitigation recommendations while emphasizing accurate documentation and reproducible results.