PATH:
opt
/
bitninja-waf3
/
coreruleset
/
rules
# ------------------------------------------------------------------------ # OWASP CRS ver.4.1.0 # Copyright (c) 2006-2020 Trustwave and contributors. All rights reserved. # Copyright (c) 2021-2024 CRS project. All rights reserved. # # The OWASP CRS is distributed under # Apache Software License (ASL) version 2 # Please see the enclosed LICENSE file for full details. # ------------------------------------------------------------------------ # We reused paranoia level skip rules 950010, 950011, and 950018. # These rule identifiers were in use in CRSv2, so we used different # identifiers in CRSv3 to avoid conflicts (950020, 950021 and 950022). # In CRSv4, for the sake of a consistent structure, we use these # identifiers again, so that the skip rules of PL can be defined in the # same way for all files. # Rule id 950130 has been kept - this ID also was introduced at first # rule to avoid the collision. # # -= Paranoia Level 0 (empty) =- (apply unconditionally) # SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:950011,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:950012,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" # # -= Paranoia Level 1 (default) =- (apply only when tx.detection_paranoia_level is sufficiently high: 1 or higher) # # # -=[ Directory Listing ]=- # SecRule RESPONSE_BODY "@rx (?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>\[To Parent Directory\]</[Aa]><br>)" \ "id:950130,\ phase:4,\ block,\ capture,\ t:none,\ msg:'Directory Listing',\ logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\ tag:'application-multi',\ tag:'language-multi',\ tag:'platform-multi',\ tag:'attack-disclosure',\ tag:'paranoia-level/1',\ tag:'OWASP_CRS',\ tag:'capec/1000/118/116/54/127',\ tag:'PCI/6.5.6',\ ver:'OWASP_CRS/4.1.0',\ severity:'ERROR',\ setvar:'tx.outbound_anomaly_score_pl1=+%{tx.error_anomaly_score}'" # # -=[ CGI Source Code Leakage ]=- # # A CGI script begins normally with #! and the interpreter, # for example: # # #!/usr/bin/perl # #!/usr/bin/python # #!/usr/bin/ruby # # If the CGI script processors or MIME type handlers are misconfigured, # the script's source code could be erroneously returned to the client. SecRule RESPONSE_BODY "@rx ^#\!\s?/" \ "id:950140,\ phase:4,\ block,\ capture,\ t:none,\ msg:'CGI source code leakage',\ logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\ tag:'application-multi',\ tag:'language-multi',\ tag:'platform-multi',\ tag:'attack-disclosure',\ tag:'paranoia-level/1',\ tag:'OWASP_CRS',\ tag:'capec/1000/118/116',\ tag:'PCI/6.5.6',\ ver:'OWASP_CRS/4.1.0',\ severity:'ERROR',\ setvar:'tx.outbound_anomaly_score_pl1=+%{tx.error_anomaly_score}'" SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:950013,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:950014,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" # # -= Paranoia Level 2 =- (apply only when tx.detection_paranoia_level is sufficiently high: 2 or higher) # # # -=[ The application is not available - 5xx level status code ]=- # SecRule RESPONSE_STATUS "@rx ^5\d{2}$" \ "id:950100,\ phase:3,\ block,\ capture,\ t:none,\ msg:'The Application Returned a 500-Level Status Code',\ logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\ tag:'application-multi',\ tag:'language-multi',\ tag:'platform-multi',\ tag:'attack-disclosure',\ tag:'paranoia-level/2',\ tag:'OWASP_CRS',\ tag:'capec/1000/152',\ tag:'PCI/6.5.6',\ ver:'OWASP_CRS/4.1.0',\ severity:'ERROR',\ setvar:'tx.outbound_anomaly_score_pl2=+%{tx.error_anomaly_score}'" SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:950015,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:950016,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" # # -= Paranoia Level 3 =- (apply only when tx.detection_paranoia_level is sufficiently high: 3 or higher) # SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:950017,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:950018,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.1.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES" # # -= Paranoia Level 4 =- (apply only when tx.detection_paranoia_level is sufficiently high: 4 or higher) # # # -= Paranoia Levels Finished =- # SecMarker "END-RESPONSE-950-DATA-LEAKAGES"
[-] REQUEST-932-APPLICATION-ATTACK-RCE.conf
[edit]
[-] REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION.conf
[edit]
[-] ssrf.data
[edit]
[-] REQUEST-931-APPLICATION-ATTACK-RFI.conf
[edit]
[+]
..
[-] REQUEST-941-APPLICATION-ATTACK-XSS.conf
[edit]
[-] REQUEST-920-PROTOCOL-ENFORCEMENT.conf
[edit]
[-] REQUEST-949-BLOCKING-EVALUATION.conf
[edit]
[-] RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example
[edit]
[-] REQUEST-922-MULTIPART-ATTACK.conf
[edit]
[-] web-shells-php.data
[edit]
[-] REQUEST-933-APPLICATION-ATTACK-PHP.conf
[edit]
[-] RESPONSE-953-DATA-LEAKAGES-PHP.conf
[edit]
[-] RESPONSE-950-DATA-LEAKAGES.conf
[edit]
[-] REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example
[edit]
[-] sql-errors.data
[edit]
[-] restricted-files.data
[edit]
[-] restricted-upload.data
[edit]
[-] REQUEST-921-PROTOCOL-ATTACK.conf
[edit]
[-] REQUEST-913-SCANNER-DETECTION.conf
[edit]
[-] php-config-directives.data
[edit]
[-] RESPONSE-951-DATA-LEAKAGES-SQL.conf
[edit]
[-] php-variables.data
[edit]
[-] RESPONSE-954-DATA-LEAKAGES-IIS.conf
[edit]
[-] unix-shell.data
[edit]
[-] REQUEST-901-INITIALIZATION.conf
[edit]
[-] php-function-names-933151.data
[edit]
[-] iis-errors.data
[edit]
[-] REQUEST-911-METHOD-ENFORCEMENT.conf
[edit]
[-] RESPONSE-952-DATA-LEAKAGES-JAVA.conf
[edit]
[-] scanners-user-agents.data
[edit]
[-] RESPONSE-980-CORRELATION.conf
[edit]
[-] php-function-names-933150.data
[edit]
[-] REQUEST-944-APPLICATION-ATTACK-JAVA.conf
[edit]
[-] java-errors.data
[edit]
[-] windows-powershell-commands.data
[edit]
[-] REQUEST-942-APPLICATION-ATTACK-SQLI.conf
[edit]
[-] java-classes.data
[edit]
[-] php-errors-pl2.data
[edit]
[-] php-errors.data
[edit]
[-] REQUEST-905-COMMON-EXCEPTIONS.conf
[edit]
[-] RESPONSE-959-BLOCKING-EVALUATION.conf
[edit]
[-] REQUEST-930-APPLICATION-ATTACK-LFI.conf
[edit]
[-] RESPONSE-955-WEB-SHELLS.conf
[edit]
[-] java-code-leakages.data
[edit]
[-] REQUEST-934-APPLICATION-ATTACK-GENERIC.conf
[edit]
[-] lfi-os-files.data
[edit]