]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
detect: add test for email.cc keyword 2370/head 2371/head
authorAlice Akaki <akakialice@gmail.com>
Sat, 22 Mar 2025 01:27:58 +0000 (21:27 -0400)
committerAlice Akaki <akakialice@gmail.com>
Thu, 27 Mar 2025 02:37:28 +0000 (22:37 -0400)
Ticket: #7588

tests/detect-email-cc/README.md [new file with mode: 0644]
tests/detect-email-cc/test.rules [new file with mode: 0644]
tests/detect-email-cc/test.yaml [new file with mode: 0644]

diff --git a/tests/detect-email-cc/README.md b/tests/detect-email-cc/README.md
new file mode 100644 (file)
index 0000000..31aadd2
--- /dev/null
@@ -0,0 +1,8 @@
+# Test Description
+Test mime email.cc keyword
+
+## PCAP
+From ../smtp-to-comma/10.7.29.101_49898-178.63.41.150_25.pcap
+
+## Redmine Ticket
+https://redmine.openinfosecfoundation.org/issues/7588
diff --git a/tests/detect-email-cc/test.rules b/tests/detect-email-cc/test.rules
new file mode 100644 (file)
index 0000000..765a8dd
--- /dev/null
@@ -0,0 +1 @@
+alert smtp any any -> any any (msg:"Test mime email cc"; email.cc; content:"\"jam,abrakadabra.ch\" <mirjam@abrakadabra.ch>"; startswith; endswith; bsize:44; sid:1;)
diff --git a/tests/detect-email-cc/test.yaml b/tests/detect-email-cc/test.yaml
new file mode 100644 (file)
index 0000000..a352b7f
--- /dev/null
@@ -0,0 +1,16 @@
+requires:
+  min-version: 8
+
+pcap: ../smtp-to-comma/10.7.29.101_49898-178.63.41.150_25.pcap
+
+args:
+  - -k none --set stream.inline=true
+
+checks:
+- filter:
+    count: 1
+    match:
+      event_type: alert
+      email.cc[0]: "\"jam,abrakadabra.ch\" <mirjam@abrakadabra.ch>"
+      pcap_cnt: 18
+      alert.signature_id: 1