|
536 | 536 | "SecAuditLogType Serial", |
537 | 537 | "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
538 | 538 | ] |
| 539 | + }, |
| 540 | + { |
| 541 | + "enabled": 1, |
| 542 | + "version_min": 300000, |
| 543 | + "version_max": 0, |
| 544 | + "title": "auditlog : Binary char from input", |
| 545 | + "client": { |
| 546 | + "ip": "200.249.12.31", |
| 547 | + "port": 2313 |
| 548 | + }, |
| 549 | + "server": { |
| 550 | + "ip": "200.249.12.31", |
| 551 | + "port": 80 |
| 552 | + }, |
| 553 | + "request": { |
| 554 | + "headers": { |
| 555 | + "Host": "www.modsecurity.org", |
| 556 | + "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)", |
| 557 | + "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8", |
| 558 | + "Accept-Language": "en-us,en;q=0.5", |
| 559 | + "Accept-Encoding": "gzip,deflate", |
| 560 | + "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", |
| 561 | + "Keep-Alive": "300", |
| 562 | + "Connection": "keep-alive", |
| 563 | + "Pragma": "no-cache", |
| 564 | + "Cache-Control": "no-cache" |
| 565 | + }, |
| 566 | + "uri": "\/?%ADd+allow%3d1+%ADd+auto", |
| 567 | + "method": "GET", |
| 568 | + "http_version": 1.1, |
| 569 | + "body": "" |
| 570 | + }, |
| 571 | + "response": { |
| 572 | + "headers": { |
| 573 | + "Content-Type": "plain\/text\n\r" |
| 574 | + }, |
| 575 | + "body": [ |
| 576 | + "test" |
| 577 | + ] |
| 578 | + }, |
| 579 | + "expected": { |
| 580 | + "audit_log": "\"match\":\"Matched \\\\\"Operator `ValidateUtf8Encoding' with parameter `' against variable `ARGS_NAMES:\\\\\\\\xadd allow=1 \\\\\\\\xadd auto' \\(Value: `\\\\\\\\xadd allow=1 \\\\\\\\xadd auto' \\)\"", |
| 581 | + "debug_log": "", |
| 582 | + "error_log": "", |
| 583 | + "http_code": 403 |
| 584 | + }, |
| 585 | + "rules": [ |
| 586 | + "SecRuleEngine On", |
| 587 | + "SecRule REQUEST_FILENAME|ARGS|ARGS_NAMES \"@validateUtf8Encoding\" \"id:920250,phase:2,deny,t:none,msg:'UTF8 Encoding Abuse Attack Attempt',logdata:'%{MATCHED_VAR}'", |
| 588 | + "SecAuditEngine RelevantOnly", |
| 589 | + "SecAuditLogParts ABHJZ", |
| 590 | + "SecAuditLogFormat JSON", |
| 591 | + "SecAuditLogStorageDir /tmp/test", |
| 592 | + "SecAuditLog /tmp/audit_test_prefix.log", |
| 593 | + "SecAuditLogDirMode 0766", |
| 594 | + "SecAuditLogFileMode 0600", |
| 595 | + "SecAuditLogType Serial", |
| 596 | + "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
| 597 | + ] |
539 | 598 | } |
540 | 599 | ] |
0 commit comments