|
220 | 220 | "SecAuditLogType Serial",
|
221 | 221 | "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\""
|
222 | 222 | ]
|
| 223 | + }, |
| 224 | + { |
| 225 | + "enabled": 1, |
| 226 | + "version_min": 300000, |
| 227 | + "version_max": 0, |
| 228 | + "title": "auditlog : multiMatch data, match after last transform", |
| 229 | + "client": { |
| 230 | + "ip": "200.249.12.31", |
| 231 | + "port": 2313 |
| 232 | + }, |
| 233 | + "server": { |
| 234 | + "ip": "200.249.12.31", |
| 235 | + "port": 80 |
| 236 | + }, |
| 237 | + "request": { |
| 238 | + "headers": { |
| 239 | + "Host": "www.modsecurity.org", |
| 240 | + "User-Agent": "Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)", |
| 241 | + "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8", |
| 242 | + "Accept-Language": "en-us,en;q=0.5", |
| 243 | + "Accept-Encoding": "gzip,deflate", |
| 244 | + "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", |
| 245 | + "Keep-Alive": "300", |
| 246 | + "Connection": "keep-alive", |
| 247 | + "Pragma": "no-cache", |
| 248 | + "Cache-Control": "no-cache" |
| 249 | + }, |
| 250 | + "uri": "\/test.pl?param1=test¶m2=tEst2", |
| 251 | + "method": "GET", |
| 252 | + "http_version": 1.1, |
| 253 | + "body": "" |
| 254 | + }, |
| 255 | + "expected": { |
| 256 | + "audit_log": "\\[msg \"testmsg\"\\]", |
| 257 | + "error_log": "", |
| 258 | + "http_code": 403 |
| 259 | + }, |
| 260 | + "rules": [ |
| 261 | + "SecRuleEngine On", |
| 262 | + "SecDefaultAction \"phase:1,nolog,auditlog,deny,status:403\"", |
| 263 | + "SecRule ARGS \"@contains test2\" \"id:1557,phase:1,multiMatch,block,log,t:none,t:urlDecode,t:lowercase,msg:'testmsg'\"", |
| 264 | + "SecAuditEngine RelevantOnly", |
| 265 | + "SecAuditLogParts ABCFHZ", |
| 266 | + "SecAuditLog /tmp/test/modsec_audit_multimatch_1.log", |
| 267 | + "SecAuditLogDirMode 0766", |
| 268 | + "SecAuditLogFileMode 0666", |
| 269 | + "SecAuditLogType Serial", |
| 270 | + "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
| 271 | + ] |
| 272 | + }, |
| 273 | + { |
| 274 | + "enabled": 1, |
| 275 | + "version_min": 300000, |
| 276 | + "version_max": 0, |
| 277 | + "title": "auditlog : multiMatch data, match only after intermediate transform", |
| 278 | + "client": { |
| 279 | + "ip": "200.249.12.31", |
| 280 | + "port": 2313 |
| 281 | + }, |
| 282 | + "server": { |
| 283 | + "ip": "200.249.12.31", |
| 284 | + "port": 80 |
| 285 | + }, |
| 286 | + "request": { |
| 287 | + "headers": { |
| 288 | + "Host": "www.modsecurity.org", |
| 289 | + "User-Agent": "Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)", |
| 290 | + "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8", |
| 291 | + "Accept-Language": "en-us,en;q=0.5", |
| 292 | + "Accept-Encoding": "gzip,deflate", |
| 293 | + "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", |
| 294 | + "Keep-Alive": "300", |
| 295 | + "Connection": "keep-alive", |
| 296 | + "Pragma": "no-cache", |
| 297 | + "Cache-Control": "no-cache" |
| 298 | + }, |
| 299 | + "uri": "\/test.pl?param1=test¶m2=%20tEst2", |
| 300 | + "method": "GET", |
| 301 | + "http_version": 1.1, |
| 302 | + "body": "" |
| 303 | + }, |
| 304 | + "expected": { |
| 305 | + "audit_log": "\\[msg \"tstmsg\"\\]", |
| 306 | + "error_log": "", |
| 307 | + "http_code": 403 |
| 308 | + }, |
| 309 | + "rules": [ |
| 310 | + "SecRuleEngine On", |
| 311 | + "SecDefaultAction \"phase:1,nolog,auditlog,deny,status:403\"", |
| 312 | + "SecRule ARGS \"@streq tEst2\" \"id:1558,phase:1,multiMatch,block,log,t:none,t:trim,t:lowercase,msg:'tstmsg'\"", |
| 313 | + "SecAuditEngine RelevantOnly", |
| 314 | + "SecAuditLogParts ABCFHZ", |
| 315 | + "SecAuditLog /tmp/test/modsec_audit_multimatch_2.log", |
| 316 | + "SecAuditLogDirMode 0766", |
| 317 | + "SecAuditLogFileMode 0666", |
| 318 | + "SecAuditLogType Serial", |
| 319 | + "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
| 320 | + ] |
223 | 321 | }
|
224 | 322 | ]
|
0 commit comments