FTP
— File Transfer ProtocolFTP operates over two distinct channels: a command/control channel (TCP port 21) for authentication and navigation, and a separate dynamic data channel (TCP port 20 or passive port) for bulk file payload transfer.
Interactive Session: How FTP Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of FTP.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
Cleartext sessions and FTP bounce
InterceptionFTP sends credentials and data in the clear, and the PORT command can be abused to reach other hosts.
Sniff the control channel
The attacker captures USER and PASS commands.
FTP control traffic on port 21.
Credential theft and use of the server as a pivot.
Defences that matter
- Replace FTP with SFTP or FTPS
- Disable PORT and use passive mode only
- Egress filtering from servers
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- Dual-port architecture (Port 21 Command, Port 20 Data)
- Active Mode vs Passive (PASV) Mode to navigate NAT firewalls
- Text/ASCII and Binary (IMAGE) file transfer modes
- Plaintext credentials (modern setups use FTPS with TLS)
Real-World Use Cases
- Legacy server file maintenance
- Website updates via FTP clients like FileZilla
- Automated bulk document archiving
Advantages & Strengths
- Simple, established standard supported across virtually all operating systems
Limitations & Vulnerabilities
- Plaintext passwords and data stream without encryption; firewall complexity due to dual ports