
Full-lifecycle penetration test of a legacy Linux environment (Metasploitable 2) emulated on Apple Silicon. Demonstrating network reconnaissance, RCE via service backdoors (CVE-2011-2523), and cryptographic credential recovery.
This project documents a successful, full-lifecycle penetration test against the Metasploitable 2 Linux environment. The assessment follows the Penetration Testing Execution Standard (PTES), covering initial reconnaissance, exploitation, and post-exploitation credential recovery. The primary objective was to demonstrate the security risks associated with unpatched legacy services and weak password policies.
Executing this lab required a specialized virtualization strategy to bridge the architecture gap on an Apple Silicon M5 chip:
Initial discovery was performed via ICMP "ping" sweeps to verify host availability, followed by a deep-dive service scan to map the target's attack surface.
Command:
sudo nmap -sV -O -p- -T4 192.168.1.119 -oN logs/nmap_full_scan.txt
The scan revealed over 30 open ports. The most critical entry point identified was vsftpd 2.3.4 on Port 21.
The enumeration phase identified a notorious backdoor in the vsftpd 2.3.4 service. This vulnerability allows for unauthenticated Remote Code Execution (RCE).
exploit/unix/ftp/vsftpd_234_backdoor.cmd/unix/interact.
With root access established, the focus shifted to demonstrating the impact of data exfiltration and credential theft.
/etc/shadow file, which contains encrypted password hashes for all system users.I performed an offline dictionary attack to recover plain-text credentials. The use of the outdated MD5-crypt ($1$) algorithm allowed for near-instantaneous recovery of system accounts.
Based on the findings, the following security controls are recommended:
| Account | Password | Status |
|---|
| msfadmin | msfadmin | Cracked |
| user | user | Cracked |
| sys | batman | Cracked |
| postgres | postgres | Cracked |