Vulnerability Management Lab:
Remediating Metasploitable 2 in an Isolated Virtual Network
Christopher Lee
February 2026
LinkeIn
Purpose: Demonstrate hands-on vulnerability management skills (discovery, scanning, analysis, remediation, verification, reporting) in an isolated virtual lab — aligned with CySA+ domains (threat detection, vulnerability management, reporting).
- Lab Scope & Setup
• Isolated Environment: VirtualBox Host-Only network (192.168.56.0/24) — no internet exposure, safe for deliberate vulnerabilities.
• VMs:
o Kali Linux (attacker/scanner): IP 192.168.56.101 (assumed from scans)
o Windows 10 Lab (normal target): IP 192.168.56.102
o Metasploitable 2 (vulnerable target): IP 192.168.56.103
• Tools Used: Nmap (discovery, service/version detection), netstat/lsof (local verification), service management commands (stop/disable).
VirtualBox Network Settings (Host-Only Adapter) (Show the VirtualBox Manager → Host-Only Networks tab with 192.168.56.0/24 prefix and DHCP enabled.)
-
Methodology
-
Discovery scan: nmap -sn 192.168.56.0/24 — identified live hosts.
-
Detailed scanning: nmap -sV -sC -O — service versions, sc
-
ripts, OS fingerprinting.
-
Remediation: Stopped vulnerable services, disabled startup, verified closure with netstat/lsof inside target, and nmap rescan from Kali.
-
Persistence test: Reboot target VM, re-verify ports closed.
-
Reporting: Before/after screenshots, risk ratings, commands.
Kali discovery scan (nmap -sn 192.168.56.0/24) (Shows 4–5 hosts up: Kali, Windows .102, Metasploitable .103, etc.)
Full initial nmap on Metasploitable (nmap -sV -sC -O 192.168.56.103) (Shows open ports/services table from your earlier full scan — vsftpd, Samba, r-services, etc.)
- Key Vulnerabilities & Remediations
3.1 Insecure r-services (Ports 512/513/514) Risk: Critical (CVSS ~9.8) — unauthenticated remote command execution/login (rexec/rlogin/rsh) via legacy services.
Before Ports open with netkit-rsh banners.
Remediation
• Identified xinetd as super-server (netstat -tulnp showed PID 4447/xinetd).
• Killed process: sudo kill -9 4447 + sudo killall -9 xinetd.
• Stopped service: sudo /etc/init.d/xinetd stop → [ OK ].
• Disabled startup: sudo update-rc.d -f xinetd remove.
• Verified: netstat -tuln | grep '51[2-4]' blank, ps aux | grep xinetd no process.
After (post-reboot) Ports closed.
Before nmap (nmap -sV -p 512,513,514 192.168.56.103) — open ports with banners.
netstat -tulnp showing xinetd PID on ports.
Screenshot 6: Successful stop command + blank netstat.
After nmap (ports closed).
3.2 vsftpd 2.3.4 Backdoor (Port 21) Risk: Critical (CVE-2011-2523) — anonymous FTP login opens root shell on port 6200.
Before Port 21 open with vsftpd 2.3.4.
Remediation
• Cascading from xinetd disable — vsftpd was managed on-demand by xinetd in this image.
• No additional commands needed — ports closed after xinetd remediation.
After (post-reboot) Port 21 closed.
Before nmap (nmap -sV -sC -O 192.168.56.103) — port 21 open with vsftpd 2.3.4.
After nmap — port 21 closed (ftp closed).
3.3 Samba Null Sessions / Weak Authentication (Ports 139/445) Risk: High — guest/null sessions allowed, weak/no signing, SMBv1 exposure, unauthorized share access/enumeration.
Before Ports open with Samba smbd 3.X - 4.X banners + null session scripts.
Remediation
• Stopped daemons: sudo /etc/init.d/samba stop → Stopping Samba daemons: nmbd smbd.
• Force-kill (redundant): sudo killall -9 smbd nmbd → no process killed (already stopped).
• Verified: netstat -tuln | grep '139|445' blank.
• Disabled startup: sudo update-rc.d -f samba remove.
• Rebooted VM → confirmed persistence.
After (post-reboot) Ports closed.
Screenshot 10: Before nmap (nmap -sV -p 139,445 192.168.56.103) — open with Samba banners.
Successful stop command + blank netstat.
After nmap — ports 139/445 closed.
- Conclusion & Lessons Learned
• Successfully identified, analyzed, remediated, and verified three critical/high vulnerabilities in an isolated lab.
• Demonstrated full vuln management lifecycle: scanning → analysis → mitigation → validation → persistence testing.
• Key lesson: Disabling a super-server (xinetd) can cascade to close multiple on-demand services (e.g., vsftpd).
• Future improvements: Run OpenVAS for automated CVE/risk scoring, test exploits safely (Metasploit) to show risk before fix.
Total Remediated Ports: 21, 139, 445, 512, 513, 514 — significant attack surface reduction.
Vulnerability Ports Risk Level Remediation Method Status
r-services (rexec/rlogin/rsh) 512,513,514 Critical Stop/disable xinetd, kill PID Closed
vsftpd 2.3.4 Backdoor 21 Critical Cascading from xinetd disable Closed
Samba Null Sessions / Weak Auth 139,445 High Stop/disable samba, purge rc.d Closed
- VirtualBox Host-Only Adapter (192.168.56.0/24)