]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: Add SMTP tests for issue 3616
authorJeff Lucovsky <jeff@lucovsky.org>
Thu, 15 Oct 2020 12:46:23 +0000 (08:46 -0400)
committerJeff Lucovsky <jeff@lucovsky.org>
Sun, 8 Nov 2020 14:34:41 +0000 (09:34 -0500)
tests/bug-3616-smtp/input.pcap [new file with mode: 0644]
tests/bug-3616-smtp/input.rules [new file with mode: 0644]
tests/bug-3616-smtp/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-3616-smtp/input.pcap b/tests/bug-3616-smtp/input.pcap
new file mode 100644 (file)
index 0000000..931b43b
Binary files /dev/null and b/tests/bug-3616-smtp/input.pcap differ
diff --git a/tests/bug-3616-smtp/input.rules b/tests/bug-3616-smtp/input.rules
new file mode 100644 (file)
index 0000000..eead62c
--- /dev/null
@@ -0,0 +1,3 @@
+alert smtp any any -> any any (msg:"SMTP CANARY TEST"; flow: established, to_server; file_data; content:"New code tooltip display"; sid:1;)
+alert smtp any any -> any any (msg:"SMTP strip_whitespace test #1"; flow:established, to_server; file_data; strip_whitespace; content:"Version4.9.9.0"; sid:2;)
+alert smtp any any -> any any (msg:"SMTP strip_whitespace test #2"; flow:established, to_server; file_data; strip_whitespace; content:"SupportforlatestMingwcompilersystembuilds"; sid:3;)
diff --git a/tests/bug-3616-smtp/test.yaml b/tests/bug-3616-smtp/test.yaml
new file mode 100644 (file)
index 0000000..546ecc5
--- /dev/null
@@ -0,0 +1,19 @@
+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