From: Jeff Lucovsky Date: Wed, 11 Nov 2020 12:31:57 +0000 (-0500) Subject: tests: Mixed file_data/transforms in IPS mode X-Git-Tag: suricata-6.0.4~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=507fe7e080d9b5468aaf40952908bd6d144ec715;p=thirdparty%2Fsuricata-verify.git tests: Mixed file_data/transforms in IPS mode --- diff --git a/tests/bug-3616-ips/input.pcap b/tests/bug-3616-ips/input.pcap new file mode 100644 index 000000000..cc069dc98 Binary files /dev/null and b/tests/bug-3616-ips/input.pcap differ diff --git a/tests/bug-3616-ips/input.rules b/tests/bug-3616-ips/input.rules new file mode 100644 index 000000000..fa3632ac6 --- /dev/null +++ b/tests/bug-3616-ips/input.rules @@ -0,0 +1,4 @@ +alert http any any -> any any (msg:"CANARY TEST #1"; file_data; content:"commonly-accepted commonly-used"; sid:1; rev:1;) +alert http any any -> any any (msg:"CANARY TEST #2"; http.stat_code; content:"200"; fast_pattern; file_data; content:"commonly-accepted commonly-used"; sid:2; rev:1;) +alert http any any -> any any (msg:"strip_whitespace HTTP test #1"; flow:established; file_data; strip_whitespace; content:"bricks-and-clicks"; sid:3; rev:1;) +alert tcp any any -> any any (msg:"strip_whitespace TCP test #1"; flow:established; file_data; strip_whitespace; content:"inventedtheterm"; sid:4; rev:1;) diff --git a/tests/bug-3616-ips/test.yaml b/tests/bug-3616-ips/test.yaml new file mode 100644 index 000000000..f06dcde78 --- /dev/null +++ b/tests/bug-3616-ips/test.yaml @@ -0,0 +1,24 @@ +requires: + min-version: 6 + +checks: + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 1 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 2 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 3 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 4