🔬FTP Enum

FTP (File Transfer Protocol) - a client-server protocol used to transfer files between a network using TCP/UDP connections.

It requires a command channel and a data channel.

Default FTP port is 21, opened when FTP is activated for sharing data.

sudo nmap -p21 -sV -sC -O <TARGET_IP>

Lab 1

🔬 ProFTP Recon: Basics

  • Target IP: 192.217.238.3

  • Enumeration of ProFTP server

ip -br -c a
	eth1@if170718   UP   192.217.238.2/24
  • Target IP is 192.217.238.3

nmap 192.217.238.3
	21/tcp open  ftp
nmap -p21 -sV -O 192.217.238.3
21/tcp open  ftp     ProFTPD 1.3.5a
[...]
Service Info: OS: Unix
nmap -p21

📌 FTP server version is ProFTPD 1.3.5a.

  • Try anonymous:anonymous login

  • Use hydra with some users/passwords word lists to check if any credentials work with the ftp server

hydra user:password attack

📌 Found credentials are:

sysadmin:654321 rooty:qwerty demo:butterfly auditor:chocolate anon:purple administrator:tweety diag:tigger

  • Extract the 7 flags hidden on the server by logging in to the ftp server with each found user

Reveal Flag - sysadmin flag is: 🚩

260ca9dd8a4577fc00b7bd5810298076

Reveal Flag - rooty flag is: 🚩

e529a9cea4a728eb9c5828b13b22844c

Reveal Flag - demo flag is: 🚩

d6a6bc0db10694a2d90e3a69648f3a03

Reveal Flag - auditor flag is: 🚩

098f6bcd4621d373cade4e832627b4f6

Reveal Flag - anon flag is: 🚩

1bc29b36f623ba82aaf6724fd3b16718

Reveal Flag - administrator flag is: 🚩

21232f297a57a5a743894a0e4a801fc3

Reveal Flag - diag flag is: 🚩

12a032ce9179c32a6c7ab397b9d871fa

Lab 2

🔬 VSFTPD Recon: Basics

  • Target IP: 192.119.169.3

  • Enumeration of vsftpd server

  • Target IP is 192.119.169.3

📌 FTP server version vsftpd 3.0.3

📌 Anonymous FTP login allowed

Reveal Flag: 🚩

4267bdfbff77d7c2635e4572519a8b9c


Lab 3

🔬 VSFTPD Recon: Dictionary Attack

  • Target IP: 192.14.30.3

  • Dicotionary attack on vsftpd server

  • FTP server terminates the session after 3 attemps

  • Target IP is 192.14.30.3

📌 billy's password is carlos

  • A custom script to attemp the logins is required if automated dictionary attack do not work, since the server terminates the sessions after 3 login attempts.

  • e.g. python script:

  • Fetch the flag using billy:carlos credentials

Reveal Flag: 🚩

c07c7a9be16f43bb473ed7b604295c0b


Last updated

Was this helpful?