File: RESPONSE-950-DATA-LEAKAGES.conf

package info (click to toggle)
modsecurity-crs 3.0.2-1~bpo9+1
  • links: PTS
  • area: main
  • in suites: stretch-backports
  • size: 1,064 kB
  • sloc: ansic: 727; perl: 428; python: 218; ruby: 69; makefile: 15
file content (117 lines) | stat: -rw-r--r-- 3,812 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# ------------------------------------------------------------------------
# OWASP ModSecurity Core Rule Set ver.3.0.2
# Copyright (c) 2006-2016 Trustwave and contributors. 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.
# ------------------------------------------------------------------------

# The paranoia level skip rules 950020, 950021 and 950022 have odd
# numbers not in sync with other paranoia level skip rules in other
# files. This is done to avoid rule id collisions with CRSv2.
# This is also true for rule 950130.

#
# -= Paranoia Level 0 (empty) =- (apply unconditionally)
#



SecRule TX:PARANOIA_LEVEL "@lt 1" "phase:3,id:950020,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
SecRule TX:PARANOIA_LEVEL "@lt 1" "phase:4,id:950021,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
#
# -= Paranoia Level 1 (default) =- (apply only when tx.paranoia_level is sufficiently high: 1 or higher)
#

#
# -=[ Directory Listing ]=-
#
SecRule RESPONSE_BODY "(?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>\[To Parent Directory\]<\/[Aa]><br>)" \
	"phase:response,\
	rev:'2',\
	ver:'OWASP_CRS/3.0.0',\
	maturity:'9',\
	accuracy:'9',\
	t:none,\
	capture,\
	ctl:auditLogParts=+E,\
	block,\
	msg:'Directory Listing',\
	logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
	id:950130,\
	tag:'application-multi',\
	tag:'language-multi',\
	tag:'platform-multi',\
	tag:'attack-disclosure',\
	tag:'OWASP_CRS/LEAKAGE/INFO_DIRECTORY_LISTING',\
	tag:'WASCTC/WASC-13',\
	tag:'OWASP_TOP_10/A6',\
	tag:'PCI/6.5.6',\
	severity:'ERROR',\
	setvar:'tx.msg=%{rule.msg}',\
	setvar:tx.outbound_anomaly_score=+%{tx.error_anomaly_score},\
	setvar:tx.anomaly_score=+%{tx.error_anomaly_score},\
	setvar:tx.%{rule.id}-OWASP_CRS/LEAKAGE/INFO-%{matched_var_name}=%{tx.0}"



SecRule TX:PARANOIA_LEVEL "@lt 2" "phase:3,id:950013,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
SecRule TX:PARANOIA_LEVEL "@lt 2" "phase:4,id:950014,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
#
# -= Paranoia Level 2 =- (apply only when tx.paranoia_level is sufficiently high: 2 or higher)
#

#
# -=[ The application is not available - 5xx level status code ]=-
#
SecRule RESPONSE_STATUS "^5\d{2}$" \
	"phase:response,\
	rev:'3',\
	ver:'OWASP_CRS/3.0.0',\
	maturity:'9',\
	accuracy:'9',\
	t:none,\
	capture,\
	ctl:auditLogParts=+E,\
	block,\
	msg:'The Application Returned a 500-Level Status Code',\
	logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
	id:950100,\
	tag:'application-multi',\
	tag:'language-multi',\
	tag:'platform-multi',\
	tag:'attack-disclosure',\
	tag:'WASCTC/WASC-13',\
	tag:'OWASP_TOP_10/A6',\
	tag:'PCI/6.5.6',\
        tag:'paranoia-level/2',\
	severity:'ERROR',\
	setvar:'tx.msg=%{rule.msg}',\
	setvar:tx.outbound_anomaly_score=+%{tx.error_anomaly_score},\
	setvar:tx.anomaly_score=+%{tx.error_anomaly_score},\
	setvar:tx.%{rule.id}-AVAILABILITY/APP_NOT_AVAIL-%{matched_var_name}=%{tx.0}"



SecRule TX:PARANOIA_LEVEL "@lt 3" "phase:3,id:950015,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
SecRule TX:PARANOIA_LEVEL "@lt 3" "phase:4,id:950016,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
#
# -= Paranoia Level 3 =- (apply only when tx.paranoia_level is sufficiently high: 3 or higher)
#



SecRule TX:PARANOIA_LEVEL "@lt 4" "phase:3,id:950017,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
SecRule TX:PARANOIA_LEVEL "@lt 4" "phase:4,id:950022,nolog,pass,skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
#
# -= Paranoia Level 4 =- (apply only when tx.paranoia_level is sufficiently high: 4 or higher)
#



#
# -= Paranoia Levels Finished =-
#
SecMarker "END-RESPONSE-950-DATA-LEAKAGES"