Difference between revisions of "Category:OWASP ModSecurity Core Rule Set Project"
(→Current Stable Version CRS 2.1.2)
|Line 79:||Line 79:|
= Download =
= Download =
Repository is here:
= Bug Tracker =
= Bug Tracker =
= Demo =
= Demo =
Revision as of 12:29, 14 September 2012
| This project is part of the OWASP Defenders community. |
Feel free to browse other projects within the Defenders, Builders, and Breakers communities.
<paypal>ModSecurity Core Rule Set Project</paypal>
- Bug Tracker
- Contributors and Users
- Presentations and Whitepapers
- Related Projects
- Release History
ModSecurity™ is a web application firewall engine that provides very little protection on its own. In order to become useful, ModSecurity™ must be configured with rules. In order to enable users to take full advantage of ModSecurity™ out of the box, Trustwave's SpiderLabs is sponsoring and maintaining a free certified rule set for the community. Unlike intrusion detection and prevention systems, which rely on signatures specific to known vulnerabilities, the Core Rules provide generic protection from unknown vulnerabilities often found in web applications, which are in most cases custom coded. The Core Rules are heavily commented to allow it to be used as a step-by-step deployment guide for ModSecurity™.
Core Rules Content
In order to provide generic web applications protection, the Core Rules use the following techniques:
Let's talk here
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.
Want to help?
The CRS project is always on the lookout for volunteers who are interested in contributing. We need help in the following areas:
GitHub Repository is here:
Download TAR/GZ Archive: https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/master
Download ZIP Archive: https://github.com/SpiderLabs/owasp-modsecurity-crs/zipball/master
ModSecurity CRS Demonstration/Smoketest page:
WASC Distributed Web Honeypot Project uses the Core Rule Set - http://projects.webappsec.org/Distributed-Web-Honeypots
Akamai's WAF Service is based on a previous version of the Core Rule Set - http://www.akamai.com/html/about/press/releases/2009/press_121409.html
Varnish Web Cache/Accelerator uses a converted version of the CRS - https://github.com/comotion/security.vcl
Core Rule Set Quick Setup
To activate the rules for your web server installation:
1) The modsecurity_crs_10_config.conf includes management rules and directives that can control important CRS functions. Pay attention to the SecRuleEngine setting (On by default) and that the SecDefaultAction directive is set to "pass". The 49 inbound blocking and 59 outbound blocking rules files use the "block" action which inherits this setting. The effectively means that you can toggle the SecDefaultAction setting to decide if you would like to deny on an anomaly scoring/correlation match.
Update the PARANOID_MODE variable setting if you want to become more aggressive in your detection. Caution - this will cause more false positives.
Should also update the appropriate anomaly scoring levels that will be propagated to the inbound/outbound blocking files.
Update the TX policy settings for allowed Request Methods, File Extensions, etc...
2) Add the following line to your httpd.conf (assuming you've placed the rule files into conf/modsecurity_crs/):
<IfModule security2_module> Include conf/modsecurity_crs/*.conf Include conf/modsecurity_crs/base_rules/*.conf </IfModule>
3) Restart web server.
4) Make sure your web sites are still running fine.
5) Simulate an attack against the web server. Then check the attack was correctly logged in the Apache error log, ModSecurity debug log (if you enabled it) and ModSecurity audit log (if you enabled it).
ModSecurity Blog Posts
- ModSecurity Advanced Topic of the Week: Traditional vs. Anomaly Scoring Detection Modes
- ModSecurity Advanced Topic of the Week: Exception Handling
Rule Documentation Template
Each ModSecurity Rule in the CRS has an individual rule description page based on the following template file:
- Project participants are encouraged to copy this template and create landing pages for each CRS rule
- Use this template and create a new page using the following format - http://www.owasp.org/index.php?title=ModSecurity_CRS_RuleID-XXXXX (where XXXXX is the CRS ruleID)
ModSecurity Core Rule Set (CRS)
The ModSecurity Core Rule Set is provided to you under the terms and conditions of GPL version 2
This directory contains the files for Core ModSecurity Rule Set The rules are compatible with ModSecurity 2.5 (as of version 1.4.3)
Using ModSecurity requires rules. In order to enable users to take full advantage of ModSecurity immediately, Trustwave is providing a free Core rule set. Unlike intrusion detection and prevention systems which rely on signature specific to known vulnerabilities, the Core Rule Set provides generic protection from unknown vulnerabilities often found in web application that are in most cases custom coded. This is what we call "Attack Payload Detection."
Keep in mind that a predefined rule set is only part of the work required to protect your web site. We strongly urge you to consult Ivan Ristic's book, "ModSecurity Handbook" http://store.feistyduck.com/products/modsecurity-handbook and the ModSecurity Reference Manual - http://www.modsecurity.org/documentation/. The CRS is heavily commented to allow it to be used as a step-by-step deployment guide for ModSecurity.
For more information refer to the OWASP Core Rule Set Project page at http://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project
Core Rules Mail-list - Suscribe here: https://lists.owasp.org/mailman/listinfo/owasp-modsecurity-core-rule-set Archive: https://lists.owasp.org/pipermail/owasp-modsecurity-core-rule-set/
CRS 2.0 Design Concepts
CRS < 2.0 - Self-Contained Rules
Older (<2.0) CRS used individual, “self-contained” actions in rules
- If a rule triggered, it would either deny or pass and log - No intelligence was shared between rules
Not optimal from a rules management perspective (handling false positives/exceptions)
- Editing the regex could blow it up - Typical method was to copy/paste rules into custom rules files and then edit rule logic and disable core rule ID. - Heavily customized rules were less likely to be updated by the user
Not optimal from a security perspective
- Not every site had the same risk tolerance - Lower severity alerts were largely ignored - Individual low severity alerts are not important but several low severity events in the same transaction are.
CRS 2.0 - Collaborative Detection
Rules - Detection and Management
Rules logic has changed by decoupling the inspection/detection from the blocking functionality
- Rules log.pass and set transactional variables (tx) to track anomaly scores and to store meta-data about the rule match - This TX rule match data can be used by other 3rd party rules (converter Emerging Threats Snort web attack rules) to more accurately correlate identified attacks with their attack vector locations. - TX data of previous strong rule matches can also be used to conditionally apply weaker signatures that normally would have a high fasle positive rate. - Rules also increase anomaly scores for both the attack category and global score which allows users to set a threshold that is appropriate for them. - This also allows several low severity events to trigger alerts while individual ones are suppressed. - Exceptions may be handled by either increasing the overall anomaly score threshold, or by adding rules to a local custom exceptions file where TX data of previous rule matches may be inspected and anomaly scores re-adjusted based on the false positive criteria.
User can now globally update which variables to inspect and the anomaly score settings in the modsecurity_crs_10_config.conf file.
- PARANOID_MODE setting which will apply rules to locations that have a higher false positive rate - INBOUND_ANOMALY_SCORE setting will be populated in the inbound blocking file and if a transaction score at the end of phase:2 is equal to or greater than this number, it will be denied. - OUTBOUND_ANOMALY_SCORE setting will be populated in the outbound blocking file and it a transaction score at the end of phase:4 is equal to or greater than this number, it will be denied.
The CRS rules themselves are configured with the pass action, which allows all the rules to be processed and for the proposed anomaly scoring/collaborative detection concept to work. The inbound/outbound anomaly score levels may be set in the modsecurity_crs_10_config.conf file. These scores will be evaluated in the modsecurity_crs_49_inbound_blocking.conf and modsecurity_crs_59_outbound_blocking.conf files.
One of the top feedback items we have heard is that the CRS events in the Apache error_log file were very chatty. This was due to each rule triggering its own error_log entry. What most people wanted was for 1 correlated event to be generated that would give the user a higher level determination as to what the event category was.
To that end- each CRS rule will generate an audit log event Message entry but they will not log to the error_log on their own. These rules are now considered basic or reference events and may be reviewed in the audit log if the user wants to see what individual events contributed to the overall anomaly score and event designation.
After the transaction has completed (in the logging phase), the rules in the base_rules/modsecurity_crs_60_correlation.conf file will conduct further post-processing by analyzing any inbound events with any outbound events in order to provide a more intelligent/priority correlated event.
- Was there an inbound attack? - Was there an HTTP Status Code Error (4xx/5xx level)? - Was there an application information leak?
If an inbound attack was detected and either an outbound application status code error or infolead was detected, then the overall event severity is raised -
- 0: Emergency - is generated from correlation where there is an inbound attack and an outbound leakage. - 1: Alert - is generated from correlation where there is an inbound attack and an outbound application level error.
Core Rule Set Content
In order to provide generic web applications protection, the Core Rule Set uses the following techniques:
HTTP Protocol Validation and Protection
Detecting violations of the HTTP protocol and a locally defined usage policy. 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.
Protocol vulnerabilities such as Response Splitting, Request Smuggling, Premature URL ending
- Content length only for non GET/HEAD methods - Non ASCII characters or encoding in headers - Valid use of headers (for example, content length is numerical) - Proxy Access
Attack requests are different due to automation
- Missing headers such as Host, Accept, User-Agent - Host is an IP address (common worm propagation method)
Policy is usually application specific
- Some restrictions can usually be applied generically - White lists can be build for specific environments Limitations on Sizes - Request size, Upload size - # of parameters, length of parameter
Items that can be allowed or restricted
- Methods - Allow or restrict WebDAV, block abused methods such as CONNECT, TRACE or DEBUG - File extensions – backup files, database files, ini files - Content-Types (and to some extent other headers)
Automated clients are both a security risk and a commercial risk. Automated crawlers collect information from your site, consume bandwidth and might also search for vulnerabilities on the web site. Automation detection is especially useful for generic detection of comments spam.
Detecting bots, crawlers, scanners and other surface malicious activity. Not aimed against targeted attacks, but against general malicious internet activity
- Offloads a lot of cyberspace junk & noise - Effective against comment spam - Reduce event count
Detection of Malicious Robots
- Unique request attributes: User-Agent header, URL, Headers - RBL Check of IP addresses - Detection of security scanners - Blocking can confuse security testing software (WAFW00f)
This rules file is only relevant if you are concerned about comment SPAM attacks. The rules file will run an RBL check against the source IP address at SPAMHAUS and will cache the response for 1 day. If the client sends subsequent requests, it will be denied without having to re-run an RBL check.
This file will also look for comment SPAM posting attacks which submit URL links.
Common Web Attacks Protection
Common Web Attacks Protection Rules on the second level address the common web application security attack methods. These are the issues that can appear in any web application. Some of the issues addressed are:
- SQL Injection - Cross-Site Scripting (XSS) - OS Command execution - Remote code inclusion - LDAP Injection - SSI Injection - Information leak - Buffer overflows - File disclosure
- OS command injection and remote command access - Remote file inclusion - Session Fixation
The rules in this file are considered BETA quality as they have not been rigorously tested. They attempt to address advanced attacks such as HTTP Parameter Pollution or use new rule features or techniques.
This rules file attempts to identify all directory traversal variations. It is prone to a high level of false positives so set PARANOID_MODE if you want to run these rules.
- SQL injection and blind SQL injection
- Cross site scripting (XSS)
ModSecurity Core Rule Set detects access to back doors installed on a web server. This feature is very important in a hosting environment when some of this backdoors may be uploaded in a legitimate way and used maliciously. In addition the Core Rule Set includes a hook for adding an Anti-Virus program such as ClamAV for checking file uploads.
- Check uploading of http backdoor page - Access detection - Known signatures (x_key header) - Generic file management output (gid, uid, drwx, c:\)
If all fails, the Core Rule Set will detect errors sent by the web server. Detecting and blocking errors prevents attackers from collecting reconnaissance information about the web application and also server as a last line of defense in case an attack was not detected eariler.
- HTTP Error Response Status Codes - SQL Information Leakage - Stack Dumps - Source Code Leakage
Request Header Tagging
This concept is similar to anti-SPAM SMTP apps that will add additional mime headers to emails providing the SPAM detection analysis information. The CRS is attempting to mimic this concept at the HTTP layer by adding additional request headers that provide insight into any ModSecurity events that may have triggered during processing. The advantage of this approach is that it allows a WAF to be in a detection-only mode while still providing attack data to the destination application server. The recieving app server may then inspect the WAF request headers and make a determination whether or not to process the transaction. This concept is valuable in distributed web environments and hosting architectures where a determination to block may only be appropriate at the destination app server.
This rules file will take all of the TX attack variable data and populate Apache ENV variables that Apache can then use to add X-WAF-Event request header data to the request.
Example showing the consolidated X-WAF-Events and X-WAF-Score data -
Current Stable Version CRS 2.2.5
Version 2.2.5 - 06/14/2012
- Renamed main config file to modsecurity_crs_10_setup.conf - Updated the rule IDs to start from CRS reserved range: 900000 - Updated rule formatting for readibility - Updated the CSRF rules to use UNIQUE_ID as the token source - Added the zap2modsec.pl script to the /util directory which converts OWASP ZAP Scanner XML data into ModSecurity Virtual Patches - Updated the Directory Traversal Signatures to include more obfuscated data - Added Arachni Scanner Integration Lua script/rules files
- Added forceRequestBodyVariable action to rule ID 960904 - Updated the anomaly scoring value for rule ID 960000 to critical (Identified by Qualys Vulnerability & Malware Research Labs (VMRL)) - Updated Content-Type check to fix possible evasion with @within (Identified by Qualys Vulnerability & Malware Research Labs (VMRL))
Version 2.2.4 - 03/14/2012
Improvements: - Added Location and Set-Cookie checks to Response Splitting rule ID 950910 - Added a README file to the activated_rules directory - Consolidate a number of SQL Injection rules into optimized regexs - Removed multiMatch and replaceComments from SQL Injection rules - Updated the SQLi regexs for greediness - Updated the SQLi setvar anomaly score values to use macro expansion - Removed PARANOID mode rules
Bug Fixes: - Fixed missing comma before severity action in rules 958291, 958230 and 958231 - Fixed duplidate rule IDs
Version 2.2.3 - 12/19/2011
Improvements: - Added Watcher Cookie Checks to optional_rules/modsecurity_crs_55_appication_defects.conf file
- Added Watcher Charset Checks to optional_rules/modsecurity_crs_55_application_defects.conf file
- Added Watcher Header Checks to optional_rules/modsecurity_crs_55_application_defects.conf file
Bug Fixes: - Fixed Content-Type evasion issue by adding ctl:forceRequestBodyVariable action to
rule ID 960010. (Identified by Andrew Wilson of Trustwave SpiderLabs).
- Updated the regex and added tags for RFI rules.
Version 2.2.2 - 09/28/2011
Improvements: - Updated the AppSensor Profiling (to use Lua scripts) for Request Exceptions Detection Points - Added new Range header detection checks to prevent Apache DoS - Added new Security Scanner User-Agent strings - Added example script to the /util directory to convert Arachni DAST scanner
XML data into ModSecurity virtual patching rules.
- Updated the SQLi Character Anomaly Detection Rules - Added Host header info to the RESOURCE collection key for AppSensor profiling rules
Bug Fixes: - Fixed action list for XSS rules (replaced pass,nolog,auditlog with block) - Fixed Request Limit rules by removing & from variables - Fixed Session Hijacking IP/UA hash captures - Updated the SQLi regex for rule ID 981242
Version 2.2.1 - 07/20/2011
Improvements: - Extensive SQL Injection signature updates as a result of the SQLi Challenge
- Updated the SQL Error message detection in reponse bodies - Updated SQL Injection signatures to include more DB functions - Updated the WEAK SQL Injection signatures - Added tag AppSensor/RE8 to rule ID 960018
Bug Fixes: - Fixed Bad Robot logic for rule ID 990012 to further qualify User-Agent matches
- Fixed Session Hijacking rules to properly capture IP address network hashes. - Added the multiMatch action to the SQLi rules - Fixed a false negative logic flaw within the advanced_filter_converter.lua script - Fixed missing : in id action in DoS ruleset. - Updated rule ID 971150 signature to remove ;
Version 2.2.0 - 05/26/2011
Improvements: - Changed Licensing from GPLv2 to Apache Software License v2 (ASLv2)
- Created new INSTALL file outlining quick config setup - Added a new rule regression testing framework to the /util directory - Added new activated_rules directory which will allow users to place symlinks pointing
to files they want to run. This allows for easier Apache Include wild-carding
- Adding in new RULE_MATURITY and RULE_ACCURACY tags - Adding in a check for X-Forwarded-For source IP when creating IP collection - Added new Application Defect checks (55 app defect file) from Watcher tool (Check Charset)
- Added new AppSensor rules to experimental_dir
- Added new Generic Malicious JS checks in outbound content - Added experimental IP Forensic rules to gather Client hostname/whois info
- Added support for Mozilla's Content Security Policy (CSP) to the experimental_rules
- Global collection in the 10 file now uses the Host Request Header as the collection key.
This allows for per-site global collections.
- Added new SpiderLabs Research (SLR) rules directory (slr_rules) for known vulnerabilties.
This includes both converted web rules from Emerging Threats (ET) and from SLR Team.
- Added new SLR rule packs for known application vulns for WordPress, Joomla and phpBB - Added experimental rules for detecting Open Proxy Abuse
- Added experimental Passive Vulnerability Scanning ruleset using OSVDB and Lua API
- Added additional URI Request Validation rule to the 20 protocol violations file (Rule ID - 981227) - Added new SQLi detection rules (959070, 959071 and 959072) - Added "Toata dragostea mea pentru diavola" to the malicious User-Agent data
Bug Fixes: - Assigned IDs to all active SecRules/SecActions - Removed rule inversion (!) from rule ID 960902 - Fixed false negative issue in Response Splitting Rule - Fixed false negative issue with @validateByteRange check - Updated the TARGETS lising for rule ID 950908 - Updated TX data for REQBODY processing - Changed the pass action to block in the RFI rules in the 40 generic file - Updated RFI regex to catch IP address usage in hostname
- Changed REQUEST_URI_RAW variable to REQUEST_LINE in SLR rules to allow matches on request methods. - Updated the RFI rules in the 40 generic attacks conf file to remove explicit logging actions.
They will now inherit the settings from the SecDefaultAction
Version 2.1.2 - 02/17/2011
Improvements: - Added experimental real-time application profiling ruleset. - Added experimental Lua script for profiling the # of page scripts, iframes, etc.. which will help to identify successful XSS attacks and planting of malware links. - Added new CSRF detection rule which will trigger if a subsequent request comes too quickly (need to use the Ignore Static Content rules).
Bug Fixes: - Added missing " in the skipAfter SecAction in the CC Detection rule set
Version 2.1.0 - 12/29/2010
- Added Experimental Lua Converter script to normalize payloads. Based on PHPIDS Converter code and it used with the advanced filters conf file. - Changed the name of PHPIDS converted rules to Advanced Filters - Added Ignore Static Content (Performance enhancement) rule set - Added XML Enabler (Web Services) rule set which will parse XML data - Added Authorized Vulnerability Scanning (AVS) Whitelist rule set - Added Denial of Service (DoS) Protection rule set - Added Slow HTTP DoS (Connection Consumption) Protection rule set - Added Brute Force Attack Protection rule set - Added Session Hijacking Detection rule set - Added Username Tracking rule set - Added Authentication Tracking rule set - Added Anti-Virus Scanning of File Attachments rule set - Added AV Scanning program to /util directory - Added Credit Card Usage Tracking/Leakage Prevention rule set - Added experimental CC Track/PAN Leakage Prevention rule set - Added an experimental_rules directory to hold new BETA rules - Moved the local exceptions conf file back into base_rules dirctory however it has a ".example" extension to prevent overwriting customized versions when upgrading - Separated out HTTP Parameter Pollution and Restricted Character Anomaly Detection rules to the experimental_rules directory - Adding the REQUEST_HEADERS:User-Agent macro data to the initcol in 10 config file, which will help to make collections a bit more unique
Version 2.0.8 - 08/27/2010
- Updated the PHPIDS filters - Updated the SQL Injection filters to detect boolean attacks (1<2, foo == bar, etc..) - Updated the SQL Injection filters to account for different quotes - Added UTF-8 encoding validation support to the modsecurity_crs_10_config.conf file - Added Rule ID 950109 to detect multiple URL encodings - Added two experimental rules to detect anomalous use of special characters
- Fixed Encoding Detection RegEx (950107 and 950108) - Fixed rules-updater.pl script to better handle whitespace https://www.modsecurity.org/tracker/browse/MODSEC-167 - Fixed missing pass action bug in modsecurity_crs_21_protocol_anomalies.conf https://www.modsecurity.org/tracker/browse/CORERULES-55 - Fixed the anomaly scoring in the modsecurity_crs_41_phpids_filters.conf file https://www.modsecurity.org/tracker/browse/CORERULES-54 - Updated XSS rule id 958001 to improve the .cookie regex to reduce false postives https://www.modsecurity.org/tracker/browse/CORERULES-29
Version 2.0.7 - 06/4/2010
- Fixed false positives for Request Header Name matching in the 30 file by adding boundary characters. - Added missing pass actions to @pmFromFile prequalifier rules - Added backslash to SQLi regex https://www.modsecurity.org/tracker/browse/CORERULES-41 - Fixed hard coded anomaly score in PHPIDS filter file https://www.modsecurity.org/tracker/browse/CORERULES-45 - Fixed restricted_extension false positive by adding boundary characters
Version 2.0.6 - 02/26/2010
- Added missing transformation functions to SQLi rules. https://www.modsecurity.org/tracker/browse/CORERULES-32 - Fixed duplicate rule IDs. https://www.modsecurity.org/tracker/browse/CORERULES-33 - Fixed typo in @pmFromFile in the Comment SPAM rules https://www.modsecurity.org/tracker/browse/CORERULES-34 - Added macro expansion to Restricted Headers rule https://www.modsecurity.org/tracker/browse/CORERULES-35 - Fixed misspelled SecMarker https://www.modsecurity.org/tracker/browse/CORERULES-36 - Fixed missing chain action in Content-Type header check https://www.modsecurity.org/tracker/browse/CORERULES-37 - Update phpids filters to use pass action instead of block
Version 2.0.5 - 02/01/2010
- Removed previous 10 config files as they may conflict with local customized Mod configs. - Added a new 10 config file that allows the user to globally set TX variables to turn on/off PARANOID_MODE inspection, set anomaly score levels and http policies. Must have ModSecurity 2.5.12 to use the macro expansion in numeric operators. - Added Rule Logic and Reference links to rules descriptions. - Added Rule IDs to all rules. - Added tag data mapping to new OWASP Top 10 and AppSensor Projects, WASC Threat Classification - Removed Apache limit directives from the 23 file - Added macro expansion to 23 file checks. - Added @pmFromFile check to 35 bad robots file - Added malicious UA strings to 35 bad robots check - Created an experimental rules file - Updated HTTP Parameter Pollution (HPP) rule logic to concat data into a TX variable for inspection - Removed TX inspections for generic attacks and reverted to standard ARGS inspection https://www.modsecurity.org/tracker/browse/MODSEC-120 - Updated the variable list for standard inspections (ARGS|ARGS_NAMES|XML:/*) and moved the other variables to the PARANOID list (REQUEST_URI|REQUEST_BODY|REQUEST_HEADERS|TX:HPP_DATA) - Moved converted ET Snort rules to the /optional_rules directory - Created a new Header Tagging ruleset (optional_rules) that will add matched rule data to the request headers. - Updated Inbound blocking conf file to use macro expansion from the 10 config file settings - Added separate anomaly scores for inbound, outbound and total to be evaluated for blocking. - Updated the regex logic in the (1=1) rule to factor in quotes and other logical operators. - Updated the SPAMMER RBL check rules logic to only check once per IP/Day. - Added new outbound malware link detection rules.
- Removed Non-numeric Rule IDs https://www.modsecurity.org/tracker/browse/CORERULES-28 - Updated the variable list on SQLi rules. - Fixed outbound @pmFromFile action from allow to skipAfter to allow for outbound anomaly scoring and blocking
Version 2.0.4 - 11/30/2009
- Updated converted PHPIDS signatures (https://svn.php-ids.org/svn/trunk/lib/IDS/default_filter.xml) - Updated PHPIDS rules logic to first search for payloads in ARGS and then if there is no match found then search more generically in request_body|request_uri_raw - Updated PHPIDS rules logic to only set TX variables and to not log. This allows for more clean exceptions in the 48 file which can then expire/delete false positive TX matches and adjust the anomaly scores. These rules will then inspect for any TX variables in phase:5 and create appropriate alerts for any variable matches that exist.
- Added Anomaly Score check to the 60 correlation file to recheck the anomaly score at the end of phase:4 which would allow for blocking based on information leakage issues.
This page documents the goals/ideas for the next major version of the CRS.
These are not listed in any particular order.
- Add New Detection Logic
- Fraud Detection (Session Hijacking/CSRF/Banking Trojans)
- User Profiling (GeoIP/Browser Fingerprinting)
- Increase Rule Accuracy
- Reduce False Positives - many users complain about the number of false positives and the negative impacts (breaking functionality) when in blocking mode
- Reduce False Negatives - we need to constantly improve detection so that we don't miss attacks (http://blog.spiderlabs.com/2011/07/modsecurity-sql-injection-challenge-lessons-learned.html)
- Increase Performance/Reduce Latency
- Utilize set-based pattern matching (@pm/@pmf) for pre-qualification of regular expression checks
- Optimize individual @rx SecRules into less optimized versions
- Review all regular expression rules for performance (non-capturing/greediness).
- Improve Rule Management
- Make it easier for user to enable/disable the desired rules for their platform
- Update rule formatting for easier readability
- Reorder/Regroup rule into new file names
Detection Logic/Flow Concepts
This section outlines the processing flow and associated points of detection and actions taken.
- IP Reputation
- Data inspected: REMOTE_ADDR
- Use @rbl to check against remote RBLs
- Use @pmf to check a local file if bad IPs
- Use GeoIP Data to assign fraud scores
- Increase TX anomaly score
- Tag client as "suspicious" in IP collection
- Request Method Analysis
- Data inspected: REQUEST_METHOD
- Compare the REQUEST_METHOD specified against:
- Allowed global methods set by the admin in the modsecurity_crs_10_setup.conf file
- Request methods allowed per-resource (GET vs. POST)
- Increase TX anomaly score
- Tag client as "suspicious" in IP collection
- Request Header Analysis
- Data inspected: REQUESTE_HEADERS
- Check for existence of malicious headers (User-Agent of scanners, etc..)
- Check for the absence of required headers (Host, User-Agent, Accept)
- Request Header Ordering Anomalies detects non-browsers/bots
- Increase TX anomaly score
- Tag client as "suspicious" in IP collection
| PROJECT INFO
What does this OWASP project offer you?
| RELEASE(S) INFO|
What releases are available for this project?
The CRS is an open source rule set licensed under ASLv2. ModSecurity Core Rule Set works with ModSecurity 2.5 and above.
Pages in category "OWASP ModSecurity Core Rule Set Project"
The following 16 pages are in this category, out of 16 total.
- OWASP ModSec CRS Paranoia Mode
- OWASP ModSec CRS Paranoia Mode Sibling 950001
- OWASP ModSec CRS Paranoia Mode Sibling 950907
- OWASP ModSec CRS Paranoia Mode Sibling 958977
- OWASP ModSec CRS Paranoia Mode Sibling 958980
- OWASP ModSec CRS Paranoia Mode Sibling 960901
- OWASP ModSec CRS Paranoia Mode Sibling 970003
- OWASP ModSec CRS Paranoia Mode Sibling 981049
- OWASP ModSec CRS Paranoia Mode Sibling 981172
- OWASP ModSec CRS Paranoia Mode Sibling 981173
- OWASP ModSecurity rule evaluation framework