From: Alice Akaki Date: Sat, 22 Mar 2025 01:59:22 +0000 (-0400) Subject: detect: add test for email.subject keyword X-Git-Tag: suricata-7.0.10^0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2361%2Fhead;p=thirdparty%2Fsuricata-verify.git detect: add test for email.subject keyword Ticket: #7595 --- diff --git a/tests/detect-email-subject/README.md b/tests/detect-email-subject/README.md new file mode 100644 index 000000000..34258ae3f --- /dev/null +++ b/tests/detect-email-subject/README.md @@ -0,0 +1,8 @@ +# Test Description +Test mime email.subject keyword + +## PCAP +From ../mime/mime-dec-parse-full-msg-test02/input.pcap + +## Redmine Ticket +https://redmine.openinfosecfoundation.org/issues/7595 diff --git a/tests/detect-email-subject/test.rules b/tests/detect-email-subject/test.rules new file mode 100644 index 000000000..cf2d3a269 --- /dev/null +++ b/tests/detect-email-subject/test.rules @@ -0,0 +1 @@ +alert smtp any any -> any any (msg:"Test mime email subject"; email.subject; content:"This is a test email"; startswith; endswith; bsize:20; sid:1;) diff --git a/tests/detect-email-subject/test.yaml b/tests/detect-email-subject/test.yaml new file mode 100644 index 000000000..4ba8abbcd --- /dev/null +++ b/tests/detect-email-subject/test.yaml @@ -0,0 +1,15 @@ +requires: + min-version: 8 + +pcap: ../mime/mime-dec-parse-full-msg-test02/input.pcap + +args: + - -k none --set stream.inline=true + +checks: +- filter: + count: 1 + match: + event_type: alert + pcap_cnt: 13 + alert.signature_id: 1