|
541 | 541 | "enabled": 1, |
542 | 542 | "version_min": 300000, |
543 | 543 | "version_max": 0, |
544 | | - "title": "auditlog : Binary char from input", |
| 544 | + "title": "auditlog : Binary char from input, check message", |
545 | 545 | "client": { |
546 | 546 | "ip": "200.249.12.31", |
547 | 547 | "port": 2313 |
|
595 | 595 | "SecAuditLogType Serial", |
596 | 596 | "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
597 | 597 | ] |
| 598 | + }, |
| 599 | + { |
| 600 | + "enabled": 1, |
| 601 | + "version_min": 300000, |
| 602 | + "version_max": 0, |
| 603 | + "title": "auditlog : Binary char from input, check body", |
| 604 | + "client": { |
| 605 | + "ip": "200.249.12.31", |
| 606 | + "port": 2313 |
| 607 | + }, |
| 608 | + "server": { |
| 609 | + "ip": "200.249.12.31", |
| 610 | + "port": 80 |
| 611 | + }, |
| 612 | + "request": { |
| 613 | + "headers": { |
| 614 | + "Host": "www.modsecurity.org", |
| 615 | + "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)", |
| 616 | + "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8", |
| 617 | + "Accept-Language": "en-us,en;q=0.5", |
| 618 | + "Accept-Encoding": "gzip,deflate", |
| 619 | + "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", |
| 620 | + "Keep-Alive": "300", |
| 621 | + "Connection": "keep-alive", |
| 622 | + "Pragma": "no-cache", |
| 623 | + "Cache-Control": "no-cache", |
| 624 | + "Content-Type": "application/x-www-form-urlencoded", |
| 625 | + "Content-Length": "3" |
| 626 | + }, |
| 627 | + "uri": "\/?attack=true", |
| 628 | + "method": "POST", |
| 629 | + "http_version": 1.1, |
| 630 | + "body": [ |
| 631 | + "\u00ad=\u00ad" |
| 632 | + ] |
| 633 | + }, |
| 634 | + "response": { |
| 635 | + "headers": { |
| 636 | + "Content-Type": "plain\/text\n\r" |
| 637 | + }, |
| 638 | + "body": [ |
| 639 | + "test" |
| 640 | + ] |
| 641 | + }, |
| 642 | + "expected": { |
| 643 | + "audit_log": "\"body\":\"\\\\\\\\xc2\\\\\\\\xad=\\\\\\\\xc2\\\\\\\\xad\\\\\\\\x0a", |
| 644 | + "debug_log": "", |
| 645 | + "error_log": "", |
| 646 | + "http_code": 403 |
| 647 | + }, |
| 648 | + "rules": [ |
| 649 | + "SecRuleEngine On", |
| 650 | + "SecRule ARGS_NAMES \"@rx attack\" \"id:1,phase:2,deny,t:none", |
| 651 | + "SecAuditEngine RelevantOnly", |
| 652 | + "SecAuditLogParts ABCHJZ", |
| 653 | + "SecAuditLogFormat JSON", |
| 654 | + "SecAuditLogStorageDir /tmp/test", |
| 655 | + "SecAuditLog /tmp/audit_test_prefix.log", |
| 656 | + "SecAuditLogDirMode 0766", |
| 657 | + "SecAuditLogFileMode 0600", |
| 658 | + "SecAuditLogType Serial", |
| 659 | + "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
| 660 | + ] |
| 661 | + }, |
| 662 | + { |
| 663 | + "enabled": 1, |
| 664 | + "version_min": 300000, |
| 665 | + "version_max": 0, |
| 666 | + "title": "auditlog : Binary char from input, check header", |
| 667 | + "client": { |
| 668 | + "ip": "200.249.12.31", |
| 669 | + "port": 2313 |
| 670 | + }, |
| 671 | + "server": { |
| 672 | + "ip": "200.249.12.31", |
| 673 | + "port": 80 |
| 674 | + }, |
| 675 | + "request": { |
| 676 | + "headers": { |
| 677 | + "Host": "www.modsecurity.org", |
| 678 | + "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)", |
| 679 | + "Accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8", |
| 680 | + "Accept-Language": "en-us,en;q=0.5", |
| 681 | + "Accept-Encoding": "gzip,deflate", |
| 682 | + "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", |
| 683 | + "Keep-Alive": "300", |
| 684 | + "Connection": "keep-alive", |
| 685 | + "Pragma": "no-cache", |
| 686 | + "Cache-Control": "no-cache", |
| 687 | + "Content-Type": "application/x-www-form-urlencoded", |
| 688 | + "Content-Length": "3", |
| 689 | + "X-\u00ad-custom": "Some \u00ad value" |
| 690 | + }, |
| 691 | + "uri": "\/?attack=true", |
| 692 | + "method": "POST", |
| 693 | + "http_version": 1.1, |
| 694 | + "body": [ |
| 695 | + "\u00ad=\u00ad" |
| 696 | + ] |
| 697 | + }, |
| 698 | + "response": { |
| 699 | + "headers": { |
| 700 | + "Content-Type": "plain\/text\n\r" |
| 701 | + }, |
| 702 | + "body": [ |
| 703 | + "test" |
| 704 | + ] |
| 705 | + }, |
| 706 | + "expected": { |
| 707 | + "audit_log": "\"X-\\\\\\\\xc2\\\\\\\\xad-custom\":\"Some \\\\\\\\xc2\\\\\\\\xad value\"", |
| 708 | + "debug_log": "", |
| 709 | + "error_log": "", |
| 710 | + "http_code": 403 |
| 711 | + }, |
| 712 | + "rules": [ |
| 713 | + "SecRuleEngine On", |
| 714 | + "SecRule ARGS|ARGS_NAMES \"@rx attack\" \"id:1,phase:2,deny,t:none", |
| 715 | + "SecAuditEngine RelevantOnly", |
| 716 | + "SecAuditLogParts ABHJZ", |
| 717 | + "SecAuditLogFormat JSON", |
| 718 | + "SecAuditLogStorageDir /tmp/test", |
| 719 | + "SecAuditLog /tmp/audit_test_prefix.log", |
| 720 | + "SecAuditLogDirMode 0766", |
| 721 | + "SecAuditLogFileMode 0600", |
| 722 | + "SecAuditLogType Serial", |
| 723 | + "SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"" |
| 724 | + ] |
598 | 725 | } |
599 | 726 | ] |
0 commit comments