/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules
# ------------------------------------------------------------------------ # OWASP ModSecurity Core Rule Set ver.3.3.9 # Copyright (c) 2006-2020 Trustwave and contributors. All rights reserved. # Copyright (c) 2021-2026 Core Rule Set project. All rights reserved. # # The OWASP ModSecurity Core Rule Set is distributed under # Apache Software License (ASL) version 2 # Please see the enclosed LICENSE file for full details. # ------------------------------------------------------------------------ # # -= Paranoia Level 0 (empty) =- (apply unconditionally) # SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 1" "id:934011,phase:1,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 1" "id:934012,phase:2,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" # # -= Paranoia Level 1 (default) =- (apply only when tx.executing_paranoia_level is sufficiently high: 1 or higher) # # [ Insecure unserialization / generic RCE signatures ] # # Libraries performing insecure unserialization: # - node-serialize: _$$ND_FUNC$$_ (CVE-2017-5941) # - funcster: __js_function # # See: # https://opsecx.com/index.php/2017/02/08/exploiting-node-js-deserialization-bug-for-remote-code-execution/ # https://www.acunetix.com/blog/web-security-zone/deserialization-vulnerabilities-attacking-deserialization-in-js/ # # Some generic snippets used: # - function() { # - new Function( # - eval( # - String.fromCharCode( # # Last two are used by nodejsshell.py, # https://github.com/ajinabraham/Node.Js-Security-Course/blob/master/nodejsshell.py # # As base64 is sometimes (but not always) used to encode serialized values, # use multiMatch and t:base64decode. # # Regexp generated from util/regexp-assemble/regexp-934100.data using Regexp::Assemble. # See https://coreruleset.org/20190826/optimizing-regular-expressions/ for usage. SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?:(?:_(?:\$\$ND_FUNC\$\$_|_js_function)|(?:new\s+Function|\beval)\s*\(|String\s*\.\s*fromCharCode|function\s*\(\s*\)\s*{|this\.constructor)|module\.exports\s*=)" \ "id:934100,\ phase:2,\ block,\ capture,\ t:none,t:urlDecodeUni,t:base64Decode,\ msg:'Node.js Injection Attack',\ logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\ tag:'application-multi',\ tag:'language-javascript',\ tag:'platform-multi',\ tag:'attack-rce',\ tag:'attack-injection-nodejs',\ tag:'paranoia-level/1',\ tag:'OWASP_CRS',\ tag:'capec/1000/152/242',\ ctl:auditLogParts=+E,\ ver:'OWASP_CRS/3.3.9',\ severity:'CRITICAL',\ multiMatch,\ setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\ setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'" SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 2" "id:934013,phase:1,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 2" "id:934014,phase:2,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" # # -= Paranoia Level 2 =- (apply only when tx.executing_paranoia_level is sufficiently high: 2 or higher) # SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 3" "id:934015,phase:1,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 3" "id:934016,phase:2,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" # # -= Paranoia Level 3 =- (apply only when tx.executing_paranoia_level is sufficiently high: 3 or higher) # SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 4" "id:934017,phase:1,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" SecRule TX:EXECUTING_PARANOIA_LEVEL "@lt 4" "id:934018,phase:2,pass,nolog,skipAfter:END-REQUEST-934-APPLICATION-ATTACK-NODEJS" # # -= Paranoia Level 4 =- (apply only when tx.executing_paranoia_level is sufficiently high: 4 or higher) # # # -= Paranoia Levels Finished =- # SecMarker "END-REQUEST-934-APPLICATION-ATTACK-NODEJS"
.
Edit
..
Edit
REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example
Edit
REQUEST-901-INITIALIZATION.conf
Edit
REQUEST-903.9001-DRUPAL-EXCLUSION-RULES.conf
Edit
REQUEST-903.9002-WORDPRESS-EXCLUSION-RULES.conf
Edit
REQUEST-903.9003-NEXTCLOUD-EXCLUSION-RULES.conf
Edit
REQUEST-903.9004-DOKUWIKI-EXCLUSION-RULES.conf
Edit
REQUEST-903.9005-CPANEL-EXCLUSION-RULES.conf
Edit
REQUEST-903.9006-XENFORO-EXCLUSION-RULES.conf
Edit
REQUEST-905-COMMON-EXCEPTIONS.conf
Edit
REQUEST-910-IP-REPUTATION.conf
Edit
REQUEST-911-METHOD-ENFORCEMENT.conf
Edit
REQUEST-912-DOS-PROTECTION.conf
Edit
REQUEST-913-SCANNER-DETECTION.conf
Edit
REQUEST-920-PROTOCOL-ENFORCEMENT.conf
Edit
REQUEST-921-PROTOCOL-ATTACK.conf
Edit
REQUEST-922-MULTIPART-ATTACK.conf
Edit
REQUEST-930-APPLICATION-ATTACK-LFI.conf
Edit
REQUEST-931-APPLICATION-ATTACK-RFI.conf
Edit
REQUEST-932-APPLICATION-ATTACK-RCE.conf
Edit
REQUEST-933-APPLICATION-ATTACK-PHP.conf
Edit
REQUEST-934-APPLICATION-ATTACK-NODEJS.conf
Edit
REQUEST-941-APPLICATION-ATTACK-XSS.conf
Edit
REQUEST-942-APPLICATION-ATTACK-SQLI.conf
Edit
REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION.conf
Edit
REQUEST-944-APPLICATION-ATTACK-JAVA.conf
Edit
REQUEST-949-BLOCKING-EVALUATION.conf
Edit
RESPONSE-950-DATA-LEAKAGES.conf
Edit
RESPONSE-951-DATA-LEAKAGES-SQL.conf
Edit
RESPONSE-952-DATA-LEAKAGES-JAVA.conf
Edit
RESPONSE-953-DATA-LEAKAGES-PHP.conf
Edit
RESPONSE-954-DATA-LEAKAGES-IIS.conf
Edit
RESPONSE-959-BLOCKING-EVALUATION.conf
Edit
RESPONSE-980-CORRELATION.conf
Edit
RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example
Edit
crawlers-user-agents.data
Edit
iis-errors.data
Edit
java-classes.data
Edit
java-code-leakages.data
Edit
java-errors.data
Edit
lfi-os-files.data
Edit
php-config-directives.data
Edit
php-errors.data
Edit
php-function-names-933150.data
Edit
php-function-names-933151.data
Edit
php-variables.data
Edit
restricted-files.data
Edit
restricted-upload.data
Edit
scanners-headers.data
Edit
scanners-urls.data
Edit
scanners-user-agents.data
Edit
scripting-user-agents.data
Edit
sql-errors.data
Edit
unix-shell.data
Edit
windows-powershell-commands.data
Edit