[ad]
To follow on from Whitetrash which I posted about previously, here is another tool to secure your web site or web application. Essentially it’s a very comprehensive set of rules for mod_security.
ModSecurity is an open source intrusion detection and prevention engine for web applications (or a web application firewall). Operating as an Apache Web server module or standalone, the purpose of ModSecurity is to increase web application security, protecting web applications from known and unknown attacks.
For ModSecurity to be effective it needs a rule set just like any IDS or Anti-virus solution, gotroot currently provides the largest selection of rules to secure your site.
This is only an option if you are using Apache 1.x or Apache 2.x if you are using IIS or another web server you are out of luck.
If you run any kind of web application, you need a web application firewall. Simply put, a web application firewall analyzes the connections to your web application to make sure they don’t contain attacks, viruses, worms or violate certain rules about normal or acceptable behavior for your web application(s).
The gotroot rules protect against all of that, and more, such as SQL injection protection, URI formating protection, meta and null character filtering, path recursion attack protection, buffer and heap overflow defenses, remote file inclusion attack prevention and many many others. This helps to protect your web server, applications, database or anything else your web application(s) have potential access to from attack.
This is to protect the application level – firewalls only examine packets on the network level, IDS can do a little on the application side but not as much as ModSecurity and a good set of rules.
You can find the gotroot rules here:
Including instructions on how to download/update them automatically.
goodpeople says
Oh wow! am I going to have fun with this one…
Sir Henry says
I just built a server for my director that will serve his website from home. Although Apache is installed, I cautioned him about doing so when being an absolute neophyte in the ways of Linux and Apache. This will be awesome for him and hopefully get him learned on a thing or two about Apache and security. Thanks for posting this.
fak3r says
I’ve posted here about mod_security before, it’s a great tool, but it if you pile on all of these rules it will slow page loads significantly. Best is to use mod_sec core rules, and pepper in some got root rules that look useful.
Oh, and patch PHP with sudokin first.
kaneda says
Argh – download links are broken on the gotroot website, do you guys have a mirror instead?
Pantagruel says
fak3r has a good point. An extensive rule set will definitely slow down the response (especially on a overloaded server or less powerful server). To my opinion this is a small price you pay for some added security (and a nice excuse to upgrade hardware, making this hardware junkie even happier ;) )
hardening your Linux server is a good thing, hardening apache (try Google millions of howto’s) is a must.
@fak3r, do you have a good link to sudokin, Google only burps out some blog messages (and no real usable stuff). Up to now I’ve been using http://www.hardened-php.net/suhosin/index.html , tutorial(s) on http://www.howtoforge.com and it’s always a good thing to have another added layer of protection.
Sir Henry says
@Pantagruel
Yet another illustration of how it is so difficult to balance security and usability.
eM3rC says
Wow great post. Can really use this.
linuxamp says
I ran mod_security for a while but noticed that some portions of my webapp (drupal+gallery2) broke. I don’t recall exactly what broke since it was a while ago but it was significant enough for me finally decide to disable mod_security.
goodpeople says
@Linuxamp
It would be nice if you could dig up what was going on. I am planning to play with this sometime later this week.
Sir Henry says
@linuxamp:
I, too, am intrigued to find out what was the root cause of the issues you experienced. Should you have the time, please post them here.