FTP (File Transfer Protocol) clients are standard parts of many web hosting packages. We even have them in ours. Host services include FTP because people are looking for it â€“ but itâ€™s not necessarily the best tool to use for your site. The reason itâ€™s a questionable protocol is simple, as is switching to a replacement solution, SFTP (Secure File Transfer Protocol). All this will be discussed below.
For this article, I looked at various pieces from around the web, including â€œWhy You Need to Stop Using FTPâ€ from JBDFu.com, â€œSecurity Issues in FTPâ€ from raditha.com, â€œFTP, SFTP and FTP/Sâ€ from InformIT, and â€œBackdoor (computing)â€ from Wikipedia.
FTP is not all bad. It is built on TCP, so it checks for errors and monitors for integrity. However, the basic problem with FTP is that it does not have the same security as SFTP does. We spoke similarly, in a recent blog post, about SSH (Secure Shell), another way to interact between machines securely. Itâ€™s common sense that choosing less secure methods to communicate and transmit data is suspect â€¦ well, depending what youâ€™re doing.
FTP has good company in sending data out in the open. Other protocols that send unencrypted data are POP, IMAP, and Jabber. All things equal, though, secured is better than unsecured, right? After all, regardless if or how someone might use your data, isnâ€™t there a creepiness factor about someone looking at your stuff?
Speaking of your â€œstuff,â€ maybe this is a good way to put it: Sure, leave your windows and blinds open sometimes if you like. But when the real gets real, when youâ€™re having a private conversation with your divorce lawyer or making babies with your wife (hopefully in the reverse order) and all your â€œstuffâ€ is out in the open, secure the perimeter. Simply put, FTP is peeping-Tom friendly, and SFTP is not.
What FTP Has in Common with Telnet
OK, the JBDFu.com gives a pretty clear understanding of why straight-up FTP is not preferable. It was invented in the early 70s. Oh, the 70s. They were a blissful time, when all we had to worry about was â€¦ our clothes and how we were painting our walls and designing our homes and buildings. We didnâ€™t have any time to think there might be kill-bots trying to steal all our information and our souls if we freely streamed data between two points. Passwords, anyone? Who gives a s%$&, nobody wants it.
OK, so quick review of Telnet entitled
Telnet: A Magical Program that You are Bound to Love Forever!! Hurray for Telnet!!
OK well, I donâ€™t know what the point of the title is, but Telnet â€¦ [sound of my throat clearing] Telnet is thirty years old. Itâ€™s outdated. It has the same unsecured problem that FTP does. Letâ€™s talk about the unsecured issue within FTP in further detail.
OK, so Telnet, mid 70s, no encryption. In the mid-1990s, people started switching over to SSH (Secure Shell). In other words, Telnet was recognized as being an inferior technology, and we moved on. Somehow FTP has stuck. Itâ€™s an established standard. There are tutorials all over the place telling us to use an FTP client to do such-and-such. Ideally, we donâ€™t want to transfer or access files with FTP, though, because it has the same issues as Telnet re: security.
â€œUse an FTP client to do this.â€ â€œUse an FTP client to do that.â€ Everybodyâ€™s saying it to us all the time. Itâ€™s not an accident. You know why? Do you? Really, you do? I doubt you do. Are you sure? You think you know why? You do? Hm, we seem to be talking in circles. Lean your head toward me so I can whisper it to you in case a military surveillance aircraft flies by. â€œI often use this technique to allow me to whisper to people. Itâ€™s a really disgusting habit.â€ You heard it here first.
Whatâ€™s wrong with FTP? It means well.
Basic issues with FTP:
- Passwords 4 Free: It doesnâ€™t encrypt passwords during transmission. Whatâ€™s the point of a password if itâ€™s not encrypted for transit? Seems kinda pointless. Like you lock the door and then leave your key under the mat. The protocol only allows the server to process login details as plain text. Partially due to this, the root account of a server typically is not usable for FTP or Telnet (which, again, has the same issues).
- Data Free-for-All: Data transmission is not encrypted. Now, this does not necessarily matter, but be aware at all times that itâ€™s easy for people to see what youâ€™re doing. FTP should feel like a public rather than a private place. Also, since FTP is often used to upload files to web servers, getting into your account isnâ€™t just a matter of reading it, as when someone gets into your email account. Access means they can change your website. Nobody wants â€œBobby Lou Was Hereâ€ scrawled across the top of their website (except for Bobby Lou, that is).
- Open the Hack Door: FTP servers that are publicly available have had hackers change the code and create backdoors (which are intrusions that allow an outsider to enter a server unnoticed and often involve implantation of software for spying purposes). Backdoors are often not found for lengthy periods of time â€“ years sometimes.
- We Have Bug Problems: Some of the more commonly used FTP servers have reputations for being buggy.
- Um â€¦ This is Hard: An additional port is needed to perform transfers. This structure makes port forwarding and firewall admin more difficult, and those two components are crucial to increasing the speed so FTP isnâ€™t sluggish.
- Donâ€™t Destroy the Evidence: Login details are stored in files on the clientâ€™s hard drive, unencrypted, in plain text. In other words, login details arenâ€™t just unsecure during transit. Theyâ€™re part of a paper trail that is automatically backed up on your computer.
So as described above, everything passes through via FTP as clear text. That includes all the login credentials, and thatâ€™s the most glaring issue. However, downloading of files presents additional problems. You canâ€™t ever really know if an ecommerce site is safe with your information, for example.
So, picture this, my friend: You go in to buy a product on a small website, such as a large blue vase with an image of naked men wrestling (which youâ€™ll tell your wife you purchased purely for aesthetic purposes). They have a high-quality SSL certificate, maybe even an EV (â€œextended validation,â€ green bar) one. You think youâ€™re fine. Input your credit card details. OK transfer successful, via SSL. Youâ€™re good. Then an administrator for the site pulls all the billing info from the site using an FTP client.
In other words, FTP can cause problems even when someone has safely transmitted their data to you. Itâ€™s not just about the clientâ€™s card information. It represents the potential for holes in your system. Swiss cheese is delicious, but I donâ€™t trust it either.
Alternatives to FTP: Following Protocols
OK so again, FTP is not without its merits but it does not have the security we want for our passwords and much of the data we upload and download onto our website or network. Here are a few alternatives:
FTP/S: This is not SFTP. It provides secure authentication (integrity re: login credentials) and can also secure data transfer, both via SSL encryption. This protocol is not very popular because, as its name kind of suggests, it involves taking FTP and adding an SSL to the equation. In that sense, FTP is to FTP/S as HTTP is to HTTPS, loosely speaking.
You need an SSL certificate, which means you either have to create one yourself and get it set up correctly or buy one to use. Itâ€™s just a little annoying and can bear a small expense. Itâ€™s also not as easy to set up as some of the other methods are.
SFTP: OK, so letâ€™s look at our winner. SFTP is probably the best alternative to FTP for four reasons.
- Secure Shell foundation: SFTP can be tied â€“ optionally â€“ into SSH, which is widely used and trusted for data encryption and transmission.
- Yes, it is a popularity contest: Because SFTP is popular, itâ€™s easy to find free software thatâ€™s compatible with your OS.
- No sweat: Easy to operate and maintain. Typically you can have an SSH serverÂ double as an SFTP server. SSH installation is quick too.
- Use of keys: With keys, everything is automated. The whole interaction is encrypted from beginning to end.
SCP: SCP, also known as Secure Copy, is similar in some ways to SFTP: it allows secure copying/transferring of files. SFTP can use SSH, but it is not reliant on that protocol; SCP, however, is reliant on and tied to SSH. SCP can be used for a number of different functions, including system tasks. SCP is more of a security concern â€“ specifically because of its capabilities. The safest way to transfer files, then, is SFTP. Working with shell accounts, however, can be accomplished with either SFTP or SCP.
TP: Toilet paper is typically not recommended for secure connections. It should be kept in the bathroom where it belongs. Toilet paper should not be jammed into a server. It should not be turned into digital software and used to wipe a backdoor. One reason TP does not work well as a secure file-transfer protocol is that it is made out of tissue rather than code, so it doesnâ€™t contain any encryption. Also, sometimes you run out. While youâ€™re driving to the store to get more, youâ€™ve opened the window for malicious entry.
Summary & Conclusion
So, SFTP: Think about it people. Make it happen. Remember, even if the particular data or files youâ€™re working with at a given time are not sensitive, your password itself can easily be stolen using FTP. That means itâ€™s never secure for sensitive situations. If you have any further thoughts or advice related to this, please comment below.