Using FTP Instead of Secure Alternatives like SFTP or FTPS
PHP applications use the standard FTP protocol (RFC 959) implemented through ftp_connect(), ftp_login(), ftp_get(), and ftp_put() functions that transmit all data including authentication credentials, commands, and file contents in unencrypted plaintext over TCP port 21. Developers choose FTP for its simplicity, wide server support, and straightforward PHP API without understanding that FTP provides zero encryption or confidentiality protection. When applications connect to FTP servers using ftp_login($conn, $username, $password), the username and password traverse the network in cleartext visible to anyone monitoring network traffic through packet sniffers (Wireshark, tcpdump), compromised network equipment, or man-in-the-middle positions. File transfer operations using ftp_get() and ftp_put() similarly transmit complete file contents unencrypted, exposing sensitive data including database backups, configuration files containing API keys, user data exports, or business documents. Attackers positioned on the network path—compromised WiFi access points, malicious ISPs, nation-state adversaries monitoring internet backbones—can passively capture FTP traffic extracting credentials for later account access and sensitive file contents for data theft, or actively manipulate transferred files injecting malware into software updates distributed via FTP.