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: Basicsarrow-up-right

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

chevron-rightReveal Flag - sysadmin flag is: 🚩hashtag

260ca9dd8a4577fc00b7bd5810298076

chevron-rightReveal Flag - rooty flag is: 🚩hashtag

e529a9cea4a728eb9c5828b13b22844c

chevron-rightReveal Flag - demo flag is: 🚩hashtag

d6a6bc0db10694a2d90e3a69648f3a03

chevron-rightReveal Flag - auditor flag is: 🚩hashtag

098f6bcd4621d373cade4e832627b4f6

chevron-rightReveal Flag - anon flag is: 🚩hashtag

1bc29b36f623ba82aaf6724fd3b16718

chevron-rightReveal Flag - administrator flag is: 🚩hashtag

21232f297a57a5a743894a0e4a801fc3

chevron-rightReveal Flag - diag flag is: 🚩hashtag

12a032ce9179c32a6c7ab397b9d871fa

Lab 2

🔬 VSFTPD Recon: Basicsarrow-up-right

  • Target IP is 192.119.169.3

📌 FTP server version vsftpd 3.0.3

📌 Anonymous FTP login allowed

chevron-rightReveal Flag: 🚩hashtag

4267bdfbff77d7c2635e4572519a8b9c


Lab 3

🔬 VSFTPD Recon: Dictionary Attackarrow-up-right

  • 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

chevron-rightReveal Flag: 🚩hashtag

c07c7a9be16f43bb473ed7b604295c0b


Last updated