]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: Mixed file_data/transforms in IPS mode 348/head
authorJeff Lucovsky <jeff@lucovsky.org>
Wed, 11 Nov 2020 12:31:57 +0000 (07:31 -0500)
committerJeff Lucovsky <jeff@lucovsky.org>
Wed, 11 Nov 2020 12:31:57 +0000 (07:31 -0500)
tests/bug-3616-ips/input.pcap [new file with mode: 0644]
tests/bug-3616-ips/input.rules [new file with mode: 0644]
tests/bug-3616-ips/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-3616-ips/input.pcap b/tests/bug-3616-ips/input.pcap
new file mode 100644 (file)
index 0000000..cc069dc
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 (file)
index 0000000..fa3632a
--- /dev/null
@@ -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 (file)
index 0000000..f06dcde
--- /dev/null
@@ -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