|
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, check message", |
| 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 | + ] |
| 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 | + ] |
539 | 725 | } |
540 | 726 | ] |
0 commit comments