Showing posts with label FTP. Show all posts
Showing posts with label FTP. Show all posts

Friday, September 29, 2006

I love hackers... NOT!

One of the things I run on my Linux box is a FTP server so that friends and family can drop off and pick up photos or movies. This relieves the mail servers of the multi-meg file downloads as part of my family still has only dial up, but, they have large digital photos and movies that they want to share.

The only problem is that there were a number of hackers who probed my system and found that my system was available. Not a problem in that I don't have default IDs or passwords, but, I did leave an anonymous account available to make it easier for family to get on. The hackers did use that to try to put up warez, but, didn't have the access authority to do much else . It was a real pain as I needed to clear out the upload area every several days from their 1 meg test files and clear out my security log for the password attempts. A few sites did respond back to me when I sent a copy of my log and hopefully they will cancel their accounts, the rest didn't send me a reply.

I did make a few changes on the FTP server.
  1. FXP is now off (default is on). FXP stands for File eXchange Protocol and it lets you copy files from one FTP-server to another using a FXP-client. Normally you transfer files using the FTP protocol between your machine and a FTP-server, and the maximum transfer speed depends on the speed of your Internet connection (e.g. 56k, cable or T1). When transferring files between two remote hosts using a FXP client, the maximum transfer speed does not depend on your connection but only on the connection between the two host, which is usually much faster than your own connection. Because it is a direct connection you will not be able to see the progress or the transfer speed of the files. I guess the hackers took advantage of this.
  2. There is a prompt for userid and password now.
  3. I deleted the ability to download from the upload area. They can put files up, but, no one can download from that area until I vet the files and move them to the download area.
  4. I updated the router firewall to block out the offending sites that didn't reply back on the hack attempts.
I will be watching the security and file transfer logs for the next week on a daily basis to see if that works. My lesson is that I should have checked all of the default settings and read up on what they were before letting the FTP server loose.

Update 2006/10/06: Another site has replied back that they are looking at the problem. I believe them as I have not had a hack attack for almost a week from their IP ranges. It helped that I wrote a short, but, nice note and then attached the log showing the full attack for them. Their reply was just as polite and very professional. The change I made to turn off FXP seemed to have stopped the hackers from dropping files on my server as I have not seen any activity there for the last week.

Tuesday, August 15, 2006

Linux, FTP & hackers

I normally have a FTP server running on my Linux box so that family members can upload or download files instead of clogging our email. It has a very basic setup, an anonymous ID that will allow basic upload or download and that is all that ID can do. I have a 'power' ID that can move files, delete files, create or delete directories. The first thing I did was make sure that there was no default IDs or passwords for the server. The server is PROFTPD and I use GPROFTPD as the front end.

Now and then I get a person who thinks they can crack the system and they fail, every time. Last night was different in that I had two separate simultaneous attacks. The short attack lasted for almost 290 password combinations over two different IDs. The main one was much more determined in that he/she used over 1,100 passwords over two different IDs. The beauty of it was that every attack was logged and earlier this evening two emails went out the attackers ISPs. The ISP of the main attack politely asked me for a copy of the log and I was more than happy to send them a copy of the security log.

I am very certain that the hackers didn't get anything as I don't have any default IDs on this system. I also enforce password changes every 90 days and yes that is overkill for a personal system, but, it is a good habit to get into. The last thing is that ROOT never accesses the FTP server and the 'power' ID does not have root priviliges, just enough to maintain the FTP directories.

If you do decide to run a FTP server (Windows or Linux) here are a few things to keep in mind:
  1. Have and use a firewall.
  2. Have and use a virus scanner (Windows only, not really necessary for Linux).
  3. Kill all default IDs and passwords.
  4. Enforce regular password changes. Minimum for me is 6 characters with 1 character that is not A-Z.
  5. Turn on the FTP security and log everything.
  6. The ID that services the FTP area does not have root capabilities.
  7. Grant only the bare minimum of authority to any ID.
  8. Backup your data on a regular basis.
  9. Apply all patches ASAP.
  10. Review your FTP and firewall logs regularly.
  11. Log and trace all intrusion attempts. You can trace back the attacker to their ISP by using WHOIS and then send a short note to the admin or abuse email ID.