• Anything ‘published’ on the web is viewed as intellectual property and, regardless of whether it displays a copyright symbol or not, is therefore copyrighted by the originator. The only exception to this is if there is a “free and unrestricted reuse” statement associated with the work.

    In order to protect our members and TFL from possible litigation, all members must abide by the following new rules:

    1. Copying and pasting entire articles from another site to TFL is strictly prohibited. The same applies to articles from print or other media, and to posting photographs taken of copyrighted pages or other media.

    2. Copyright law provides for “fair use” of portions of a copyrighted work. You can copy no more than a SINGLE paragraph from the article to your post (3 or 4 sentences at most).

    3. You must provide a link to the article along with the name of website. For example: ww.xxx.yyy/zzz (The Lower Thumbsuck Daily News).

    4. You must provide, in your own words, a brief summary of the article AND your reasons for believing it will be of interest to TFL members. Failure to do so may result in the thread being closed or your post being deleted as a “cut and paste drive by.”

    5. Photographs and other images are also copyrighted. "Hotlinking" of images (so that it appears in your message) from other sites is also prohibited unless you own rights to the image. If you wish to share an image, provide a clickable link to it.

    Posts that do not follow these new guidelines will be altered or deleted by staff. Members who continue to violate this policy may lose their posting privileges at TFL.

    Thank you for your cooperation and your participation in TFL, the leading online forum for firearms enthusiasts.

Hardening your server

SteveC

New member
I'm an avid reader of TFL and missed it sorely when it went offline.

I'm also a senior Unix Sys Admin, and have been responsible for security at big and small web sites and have had my machines auditted by professional "Cybersecurity" teams. I don't want to be an armchair quarterback, but I'd like to offer a few suggestions. It sounded like you are running Linux, so I'll toss in some quickies:

1) If you are using a 2.2 series kernel, build a custom kernel using the openwall patches, and turn off loadable kernel modules. This should protect you against a majority of stack smashing exploits, and should someone break int o the machine via another means, will cut down on a bunch of ways hackers use to hide their tracks.

2) If you are using a 2.4 series kernel, get the grsecurity patches and configure as tight as you see fit. The recent 2.4 kernels are supposed to perform better under load than the 2.2 series.

3) Run something like Bastille Linux to turn off unnecessary setuid/setgid executables.

4) Run chkrootkit periodically to see if your system has been owned by some script kiddie. Make sure that chkrootkit's dependencies are isolated from the rest of the system. It may be a good idea to stabilize your machine, and build a tripwire database, and then install that and chkrootkit on a cdrom that you leave in the drive at all times.

5) Turn off all unnecessary services. Getting the latest patched versions of server code isn't such an issue if you aren't running the service to begin with. On production web servers, I usually turn off xinetd entirely, and only have 2 services: http and ssh. A stock RH Linux install sitting on the net only lasts a few hours before it gets owned.

6) If you have dependent servers, like mysqld, either have the client use IPC connections, or bind the server to localhost, and have all client connections go to the localhost address, so that nobody on the outside can even see the service is running.

7) Disaster recovery plan. Gotta have this if you want to have "defense in depth".

Most of these changes won't require any major changes in your application, and should tighten up security a lot. There are lots of other changes that could be made, but these are the high percentage ones that should keep out your basic script kiddie.

If the black hats got in via the heap overflow exploit listed for PHP, then the stack smashing defenses wouldn't have helped, but the intrusion detection tools would have detected them. You might want to look into running the web server chrooted, or migrate to the Java servlet based PHP engine. Java is safe against most buffer overflow attacks.

Anyway, thanks for all your hard work bringing the machine back up - we all appreciate it. If you need some extra help on the systems side, let me know, I wouldn't mind volunteering some of my time.

Steve
syc@onebox.com
 
9) If all else fails, keep a baseball bat handy so you wap the hacker on the noggin the next time he tries to get in your computer.
 
Steve-
Thanks. Each of your suggestions are solid and will be eval'd for our toolbox. For obvious reasons, I don't wish to go into further details here.
Rich
 
Back
Top