Default Port: 21
File Transfer Protocol (FTP) is one of the oldest protocols still showing up on engagements, and it’s worth checking early since misconfigurations here tend to be cheap wins. It runs on port 21 by default, and a login of anonymous:anonymous is common enough that it’s always worth trying before reaching for anything else.
Active Mode
The server opens a new connection back to the client for data transfer. Often blocked by client-side firewalls since it requires an inbound connection.
Passive Mode
The client initiates both connections instead. More firewall-friendly, and the default most clients and tools fall back to today.
Connecting to the Service
A handful of tools can talk to FTP directly, which is useful for a quick look before reaching for anything more structured.openssl can connect and negotiate the encrypted session where a plain client would fail:
Anonymous Login and Downloading
If anonymous access works, pulling everything off the server in one shot is usually faster than browsing it file by file.-m mirrors the entire directory structure recursively. On a server with a lot of content this can take a while, worth narrowing to a specific path first if you only need a quick look.Nmap Enumeration
Before touching anything manually, a handful of Nmap’s built-in FTP scripts cover most of the initial recon in one pass.ftp-anon checks anonymous access and ftp-syst grabs system info the server exposes post-login. For checking the vsftpd backdoor specifically, or testing the FTP bounce technique below, dedicated scripts exist for both:
Checking for Write Access
A server that allows anonymous login but also allows writes is a much bigger finding than read-only access, since it often means dropping a webshell directly onto a web root the FTP server shares with.FTP Bounce Attack
ThePORT command can be abused to make the FTP server open a connection to a third host on your behalf, effectively using the FTP server as a scanning proxy. This is useful when the FTP server sits on a network segment you can’t reach directly.
Hunting for Credentials on the Server
Once you’ve got any level of access, FTP servers used for deployment or backups often have configuration files or credentials sitting in plain sight.Brute Forcing
When anonymous login fails, credential spraying is the next step. Worth checking for default or weak credentials before moving on to something more involved.Metasploit Modules
A few auxiliary modules cover the same ground as the manual commands above, useful when you’re already working inside msfconsole against several targets.Quick Reference Tools
Hackviser: FTP
Quick-reference pentesting guide for the FTP service.
HackTricks: FTP
Deeper breakdown of FTP enumeration and exploitation techniques.

