Port 21: FTP
Analyze default service protocols, historical security vulnerabilities, hardening methods, and firewall rules for port 21.
1. Port Purpose & Usage
File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files between a client and server on a computer network. Port 21 is used to establish the control connection, which handles commands and replies.
Common Service Implementations
Very Secure FTP Daemon, widely used on Linux systems.
Highly configurable and modular FTP server software.
Lightweight and security-focused FTP server.
2. Security Risks & Vulnerability Profiles
FTP transmits commands, credentials, and data in clear text. This exposes network traffic to passive sniffing, spoofing, and man-in-the-middle (MITM) attacks. Legacy versions of FTP servers also contain remote code execution vulnerabilities.
Historical CVE References
vsftpd 2.3.4 Backdoor Vulnerability. A malicious backdoor was inserted into the source code archive, allowing attackers to execute commands as root by sending a specific character sequence.
ProFTPD Arbitrary File Copy. An issue in the mod_copy module allowed unauthenticated users to copy arbitrary files on the server.
3. Hardening & Mitigation Checklist
4. Firewall Command Examples
Use the following system configurations to restrict open port exposure on Linux hosts:
Further Analysis
Related Security Ports
Ports often operate in clusters. When analyzing a service on Port 21, security engineers typically check the status of these related ports.