The OWASP ModSecurity Core Rule Set or CRS is a set of generic attack detection rules for use with ModSecurity or compatible web application firewalls.
It aims to protect web applications from a wide range of attacks, including the OWASP Top Ten, with a minimum of false alerts.
It provides protection against many common attack categories, including:
|SQL Injection (SQLi)
Cross Site Scripting (XSS)
Local File Inclusion (LFI)
Remote File Inclusion (RFI)
PHP Code Injection
Java Code Injection New in CRS 3.1!
Unix/Windows Shell Injection
It requires an Apache/IIS/Nginx web server with ModSecurity 2.8.0 or higher.
After download, copy crs-setup.conf.example to crs-setup.conf. Optionally edit this file to configure your CRS settings. Then include the files in your webserver configuration:
Include /.../crs-setup.conf Include /.../rules/*.conf
Handling False Positives and Advanced Features
Advanced features are explained in the
crs-setup.conf and the rule files themselves. The
crs-setup.conf file is generally a very good entry point to explore the features of the CRS.
We are trying hard to reduce the number of false positives (false alerts) in the default installation. But sooner or later, you may encounter false positives nevertheless.
The OWASP ModSecurity Core Rule Set is distributed under Apache Software License (ASL) version 2. Please see the enclosed LICENSE file for full details.
Credit: Chaim Sanders, Walter Hop & Christian Folini