Category:OWASP ModSecurity Core Rule Set Project

From OWASP

Jump to: navigation, search

Overview

ModSecurity is an Apache web server module that provides a web application firewall engine. The ModSecurity Rules Language engine is extrememly flexible and robust and has been referred to as the "Swiss Army Knife of web application firewalls." While this is certainly true, it doesn't do much implicitly on its own and requires rules to tell it what to do. In order to enable users to take full advantage of ModSecurity out of the box, we have developed the Core Rule Set (CRS) which provides critical protections against attacks across most every web architecture.

Unlike intrusion detection and prevention systems, which rely on signatures specific to known vulnerabilities, the CRS is based on generic rules which focus on attack payload identification in order to provide protection from zero day and unknown vulnerabilities often found in web applications, which are in most cases custom coded.

Detection Categories

In order to provide generic web applications protection, the Core Rules use the following techniques:

  • Protocol compliance:
    • HTTP request validation - This first line of protection ensures that all abnormal HTTP requests are detected. This line of defense eliminates a large number of automated and non targeted attacks as well as protects the web server itself.
    • HTTP protocol anomalies - Common HTTP usage patterns are indicative of attacks.
    • Global constraints - Limiting the size and length of different HTTP protocol attributes, such as the number and length of parameters and the overall length of the request. Ensuring that these attributed are constrained can prevent many attacks including buffer overflow and parameter manipulation.
    • HTTP Usage policy – validate requests against a predefined policy, setting limitations request properties such as methods, content types and extensions.
  • Attack Detection:
    • Malicious client software detection - Detect requests by malicious automated programs such as robots, crawlers and security scanners. Malicious automated programs collect information from a web site, consume bandwidth and might also search for vulnerabilities on the web site. Detecting malicious crawlers is especially useful against comments spam.
    • Generic Attack Detection - Detect application level attacks such as described in the OWASP top 10. These rules employ context based patterns match over normalized fields. Detected attacks include:
      • SQL injection and Blind SQL injection.
      • Cross Site Scripting (XSS).
      • OS Command Injection and remote command access.
      • File name injection.
      • ColdFusion, PHP and ASP injection.
      • E-Mail Injection
      • HTTP Response Splitting.
      • Universal PDF XSS.
    • Trojans & Backdoors Detection - Detection of attempts to access Trojans & backdoors already installed on the system. This feature is very important in a hosting environment when some of these backdoors may be uploaded in a legitimate way and used maliciously.
  • Other:
    • Error Detection - Prevent application error messages and code snippets from being sent to the user. This makes attacking the server much harder and is also a last line of defense if an attack passes through.
    • XML Protection – The Core Rule Set can be set to examine XML payload for most signatures.
    • Search Engine Monitoring - Log access by search engines crawlers to the web site.

Let's talk here

Image:Asvs-bulb.jpgModSecurity Communities

Further development of ModSecurity and the Core Rule Set occurs through mailing list discussions and occasional workshops, and suggestions for improvement are welcome. For more information, please contact us.

funds to OWASP earmarked for ModSecurity Core Rule Set Project.

Want to help?

Image:Asvs-waiting.JPGCRS Development

The CRS project is always on the lookout for volunteers who are interested in contributing. We need help in the following areas:

  • Documentation of the CRS
  • New Detection Methods
  • Updates to existing rules

Related resources

Image:Asvs-satellite.jpgOWASP Resources


The CRS is an open source rule set licensed under GPLv2. ModSecurity Core Rule Set works with ModSecurity 2.5 and above.

This category currently contains no pages or media.

Personal tools
Language