Fix disruptive actions execution

This commit is contained in:
Felipe Zimmerle
2015-09-16 19:42:26 -03:00
parent 081fe235ad
commit 5228b685bf
15 changed files with 304 additions and 16 deletions

View File

@@ -0,0 +1,74 @@
[
{
"enabled":1,
"version_min":300000,
"title":"Testing Disruptive actions (1/n)",
"expected":{
"debug_log": " Running action: deny",
"http_code":403
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDefaultAction \"phase:2,deny,status:404\"",
"SecAction \"id:'900001',phase:request,nolog,status:403,t:none\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Testing Disruptive actions (2/n)",
"expected":{
"debug_log": " Running action: deny",
"http_code":404
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDefaultAction \"phase:2,deny,status:404\"",
"SecAction \"'id:'1',phase:request,nolog,t:none\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Testing Disruptive actions (3/n)",
"expected":{
"debug_log": " Running action: deny",
"http_code":404
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDefaultAction \"phase:2,deny,status:404\"",
"SecAction \"id:'1',phase:request,nolog,block,t:none\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Testing Disruptive actions (4/n)",
"expected":{
"http_code":200
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecAction \"id:'1',phase:request,nolog,t:none\""
]
},
{
"enabled":1,
"version_min":300000,
"title":"Testing Disruptive actions (5/n)",
"expected":{
"http_code":200
},
"rules":[
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDefaultAction \"phase:2,deny,status:404\"",
"SecAction \"id:'1',phase:request,nolog,pass,t:none\""
]
}
]

View File

@@ -3,7 +3,7 @@
"enabled": 1,
"version_min": 300000,
"version_max": 0,
"title": "actions :: trim,block",
"title": "actions :: trim,deny",
"client": {
"ip": "200.249.12.31",
"port": 2313
@@ -57,7 +57,7 @@
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,block\""
"SecRule ARGS \"@contains test\" \"id:1,t:trim,deny\""
]
},
{

View File

@@ -48,7 +48,7 @@
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,deny,auditlog\"",
"SecAuditEngine RelevantOnly",
"SecAuditLogParts ABCFHZ",
"SecAuditLogStorageDir /tmp/test",
@@ -107,7 +107,7 @@
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,deny,auditlog\"",
"SecAuditEngine RelevantOnly",
"SecAuditLogParts ABCFHZ",
"SecAuditLogStorageDir /tmp/test",
@@ -167,7 +167,7 @@
"SecRuleEngine On",
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\"",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,deny,auditlog\"",
"SecAuditEngine RelevantOnly",
"SecAuditLogParts ABCFHZ",
"SecAuditLogStorageDir /tmp/test",

View File

@@ -49,7 +49,7 @@
"SecDebugLog \/tmp\/modsec_debug.log",
"SecDebugLogLevel 9",
"SecComponentSignature \"OWASP_CRS/2.2.9\"",
"SecRule ARGS \"@contains test\" \"id:1,t:trim,block,auditlog\""
"SecRule ARGS \"@contains test\" \"id:1,t:trim,deny,status:403,auditlog\""
]
}
]