FTP (File Transfer Protocol)

FTP (File Transfer Protocol) is a time‑tested, application‑layer protocol defined originally in RFC 114 (1971) and standardized by RFC 959 (1985). It enables reliable and efficient file transfers between hosts over TCP/IP networks, offering a command channel (usually TCP port 21) for control messages and a separate data channel for actual file content, typically port 20.

FTP supports both Active and Passive modes:

  • Active: client opens port, informs server via PORT; server connects back.
  • Passive: client asks server for port (PASV); client connects to server-allocated port. This works better through firewalls/NAT environments.

RFCs Defining FTP & Its Extensions

  • RFC 959 - Core FTP definition: commands, replies, file transfer modes, control/data channels.
  • RFC 2428 - Introduced EPSV/EPRT for IPv6/passive enhancements.
  • RFC 2228 - Security extensions: AUTH, ADAT, CCC, CONF commands for TLS/SSL.
  • Other RFCs cover features like IPv6, internationalization, modification extensions, etc. .

FTP Message Fields: Commands and Replies

FTP Commands (from RFC 959 & extensions) :

| Command | Purpose | |-------------------|------------------------------------------------------------| | `USER ` | Provide login name | | `PASS ` | Provide password credential | | `ACCT ` | Provide account info for multi-step login | | `CWD ` | Change working directory | | `CDUP` | Go to parent directory | | `QUIT` | Terminate session | | `PORT h1,h2,h3,h4,p1,p2` | Set active-mode data port | | `PASV` | Request passive-mode port | | `TYPE [A,I,E,L,T]`| Set data representation type | | `STRU [F,R,P]` | Data structure (File, Record, Page) | | `MODE [S,B,C]` | Transfer mode: Stream, Block, Compressed | | `RETR ` | Download a file | | `STOR ` | Upload a file | | `DELE ` | Delete a file | | `RNFR ` | Rename-from (part 1 of renaming) | | `RNTO ` | Rename-to (part 2 of renaming) | | `PWD` | Print working directory | | `LIST [path]` | List files in directory | | `NLST [path]` | Name list (short listing) | | `MKD ` | Make directory | | `RMD ` | Remove directory | | `NOOP` | No operation (used as a keep-alive) | | `SYST` | Return system type | | `FEAT` | List server-supported features | | `HELP [command]` | Return help message | | `SITE ` | Execute server-specific command | | **Extensions** | | | `EPSV` | Extended Passive Mode | | `EPRT` | Extended Port Command | | `AUTH `| Authentication (e.g., TLS) | | `ADAT` | Authentication data exchange | | `CCC` | Clear Command Channel (post-auth TLS downgrade) | | `CONF` | Confidentiality protection | | `MFMT ` | Modify File Modification Time | | `MDTM ` | Get last modification time of a file |

How Penzzer Can Fuzz FTP‑Capable Devices

Penzzer provides advanced stateful fuzzing to discover vulnerabilities in network protocols like FTP. Here's how it fits in:

  • Stateful replay: Penzzer monitors valid FTP sessions (control/data duplex), inferring the protocol’s state machine and dynamic fields (e.g., filenames, random ports) .
  • Protocol-model fuzzing: It mutates command sequences and parameter values while respecting FTP states — e.g., login sequence must succeed before RETR.
  • Field-specific mutation: FTP commands like STOR longfilename... or TYPE EBCDIC get boundary-value, invalid, or Unicode charset mutations.
  • Security extensions: Fuzzes FTPS exchanges (AUTH TLS) and examines handling in EPSV, MFMT, MODE Z, and other extensions.

Together, that allows Penzzer to find memory corruption, logic errors, buffer overflows, and parsing flaws in FTP server and device implementations—much more systematic than dumb, stateless fuzzers.

Want to hear more about Penzzer?

Leave your details and we'll reach out shortly.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Don't miss these stories: