6.7 Ensure the OWASP ModSecurity Core Rule Set Is Installed and Enabled - Outbound Anomaly Threshold

Information

The OWASP ModSecurity Core Rules Set (CRS) is a set of open source web application defensive rules for the ModSecurity web application firewall (WAF). The OWASP ModSecurity CRS provides baseline protections in the following attack/threat categories:

HTTP Protection - detecting violations of the HTTP protocol and a locally defined usage policy.

Real-time Blacklist Lookups - utilizes 3rd Party IP Reputation

HTTP Denial of Service Protections - defense against HTTP Flooding and Slow HTTP DoS Attacks.

Common Web Attacks Protection - detecting common web application security attack.

Automation Detection - detecting bots, crawlers, scanners and other surface malicious activity.

Integration with AV Scanning for File Uploads - detects malicious files uploaded through the web application.

Tracking Sensitive Data - tracks credit card usage and blocks leakages.

Trojan Protection - detecting access to trojan horses.

Identification of Application Defects - alerts on application misconfigurations.

Error Detection and Hiding - disguising error messages sent by the server.

Note: Like other application security/application firewall systems, ModSecurity requires a significant commitment of staff resources for initial tuning of the rules and handling alerts. In some cases, this may require additional time working with application developers/maintainers to modify applications based on analysis of the results of tuning and monitoring logs. After setup, an ongoing commitment of staff is required for monitoring logs and ongoing tuning, especially after upgrades/patches. Without this commitment to tuning and monitoring, installing ModSecurity may NOT be effective and may provide a false sense of security.

Rationale:

Installing, configuring and enabling of the OWASP ModSecurity Core Rule Set (CRS), provides additional baseline security defense, and provides a good starting point to customize the monitoring and blocking of common web application attacks.

Solution

Install, configure and test the OWASP ModSecurity Core Rule Set:

Download the OWASP ModSecurity CRS from the project page https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project

Unbundled the archive and follow the instructions in the INSTALL file.

Depending on the CRS version used, the crs-setup.conf or the modsecurity_crs_10_setup.conf file will be required, and rules in the base_rules directory are intended as a baseline useful for most applications.

Test the application for correct functionality after installing the CRS. Check web server error logs and the modsec_audit.log file for blocked requests due to false positives.

It is also recommended to test the application response to malicious traffic such as an automated web application scanner to ensure the rules are active. The web server error log and modsec_audit.log files should show logs of the attacks and the servers response codes.

Default Value:

The OWASP ModSecurity CRS is NOT installed or enabled by default.

CRS v3.0 Default Values:

inbound_anomaly_score_threshold = 5

outbound_anomaly_score_threshold = 4

paranoia_level = 1

See Also

https://workbench.cisecurity.org/files/3021