21-FTP

vsftpd default path (cat /etc/vsftpd.conf | grep -v "#") Details in [[obsidian-git-sync/CERT/HTB_CPTS/Academy/02. Information Gathering/11. Footprinting/Footprinting]]

to download files

//Download All Available Files
wget -m --no-passive ftp://anonymous:anonymous@10.129.14.136
find / -type f -name ftp* 2>/dev/null | grep scripts

sudo nmap -sV -p21 -sC -A 10.129.14.136

sudo nmap -sV -p21 -sC -A 10.129.14.136 --script-trace

openssl s_client -connect 10.129.14.136:21 -starttls ftp
ls -R //recursive listing

tree .

put testupload.txt
//Service Interaction
telnet 10.129.14.136 21
nc -nv 10.129.14.136 21

vsFTPd Config File

cat /etc/vsftpd.conf | grep -v "#"

Service Interaction

nc -nv 10.129.14.136 21

telnet 10.129.14.136 21

It looks slightly different if the FTP server runs with TLS/SSL encryption. Because then we need a client that can handle TLS/SSL. For this, we can use the client openssl and communicate with the FTP server. The good thing about using openssl is that we can see the SSL certificate, which can also be helpful.

openssl s_client -connect 10.129.14.136:21 -starttls ftp

Last updated