Tuesday, March 25, 2008

How to put a secure layer between a FTP-daemon and the network?

ssh + ftp passive mode :Use ssh's port forwarding, combined with ftp's passive mode. man ssh.

sftp? :Last time I installed ssh2, I think it came with a client/server package calledsftp. Or maybe someone dropped crack in my mountain dew. You should be able totunnel it through ssh if not.
ftp://ftp.psy.uq.oz.au/pub/Crypto/SSLapps/ :
try here for various ssl based apps
ftp://ftp.psy.uq.oz.au/pub/Crypto/SSLapps/

Secure FTP: A few ways :As a previous poster suggested, use ssh with port forwarding. You might want to seethe SSH FAQ:
http://www.uni-karlsruhe.de/~ig25/ssh-faq/

As it points out, this will leave the data connection open to sniffing/hijacking.If you only care about the integrity of the files you transfer, then verifyingagainst (securely obtained) md5 checksums should do the trick. If you want toencrypt the datastream, you'll need to be a bit more fancy.

If it's possible, consider the use of 'scp' instead of ftp; you'll get protectionof both control and data, since it's built into ssh.

Another option (if you control the clients as well) is to use ssh2's "sftp" client.Beware the licensing issues with ssh2, however.If you really trust the clients, it's also quite easy to set up a VPN between theclient and server, and then FTP directly. The ways to go about this depend on theOS you're using, so I'll leave it as an exercise to the reader.

secure FTP :
You can use SSH to encrypt the control connection (i.e. secure your passwords), butit is a pain to also encrypt the data.If you want everything to be safely encrypted, your choices are:(1) Use scp (part of ssh) to do the transfers. Works like rcp, can also copy overwhole directories recursively.There are also free versions of scp out there for win and mac.(2) Use a SSL-ified FTP server and program. (check www.ssleay.org for a link).Problem: I don't know of any SSL FTP programs out there for win or mac

IPsec as an option :
If they are both Linux, then look at:
http://www.flora.org/freeswan/
Not only will your FTP be encrypted, but so willyour Telnet, HTTP, and even your pings. The goodthing about this would be that you don't need anyspecial client or server applications.

Isn't this what SSL is for ?
:Look in
ftp://ftp.uni-mainz.de:/pub/internet/security/ssl/SSLapps/ for some SSL-awaretelnet/ftp clients and servers.
Kerberized FTP :
I'm pretty sure that MIT's athena distribution provides a modified version of FTPwhich has kerberos support. This allows for secure authentication, but I'm not sureif the anything else is encrypted. If authentication is all that you need to besecure you might want to check it out. Kerberos can be a pain to get working, butonce it is working it's really nice (i.e., you enter a password once and all yourkerberos enabled programs never bug you for a password).Ssh port forwarding would probably also work, but everybody else has alreadysuggested that so I figured I'd throw out a different option.

GSSFTP :If you download MIT Kerberos 5
( http://web.mit.edu/kerberos/www/ ),
it includes GSSFTP which is a Kerberized FTPservice. Unless you have a Kerberos infrastructure at your location, however, thismay be an excessively complicated solution for you.

sendfile (for something completely different) :
If security is a big concern, and your ftp site is really only for a select groupof people, you may wish to consider the sendfile suite of utilities based on theSAFT (?) protocol. Basically, it's akin to email or instant messaging systems butwith files and with decent security involved (you can filter out spurious sendersof files, no passwords need pass over the 'net).Something to give a shot for those of you wanting to give your friend, who's toolazy/paranoid/poor to set up an ftp server, a file.

SSL/TLS FTP :
You can use an industry standard encryption and authentication protocol with FTPsupported by various clients.First, go to http://www.openssl.org/ . OpenSSL is based on SSLeay and is the basisfor open source SSL communications in unix. You'll want to grab openssl and compileit and install it. It provides a number of useful programs including md5 & sha forgenerating checksums on files and a whole suite of other cipher routines.Next visit http://www.psy.uq.oz.au/~ftp/Crypto/ and go find an FTP server andclient pair which have SSL support. There are also a few general proxy deals whichcan handle it with any standard FTP server.Now there are a few ways to do authentication, you can do normal authentication orauthentication based on certificate which requires a CA server (things likeverisign will work if you want to shell out some cash, but you can also build yourown CA).The great thing about SSL is it can autodetect encryption support. So you can takea standard telnet server, make a few minor modifications to get it SSL capable andconnect to it using SSL capable telnet client or a vanilla telnet client and it'lluse the strongest security possible.No need for silly third party daemons or special ports. Although the official TLSservice ports are different from their unencrypted couterparts.This is good if you are behind a corporate lan which doesn't like allowing anythingbesides telnet, ftp, and web traffic through their proxy.

CIPE - Crypto IP Encapsulation :
CIPE - encrypted IP over UDP tunneling"This is an ongoing project to build encrypting IP routers. The protocol used is aslightweight as possible. It is designed for passing encrypted packets betweenprearranged routers in the form of UDP packets. This is not as flexible as IPSECbut it is enough for the original intended purpose: securely connecting subnetsover an insecure transit network. The implementations mentioned below are actuallyin use in such an application."The newest version of CIPE is available onhttp://sites.inka.de/~bigred/devel/cipe.htmlor ftp://sites.inka.de/sites/bigred/devel/cipe.html
It also works well for getting around those pesky universtity firewalls.

Secure FTP ? :Have a look at:
SSL tunnel:
http://mike.daewoo.com.pl/computer/stunnel/.

No comments:

Post a Comment