]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
add test for base64_data w fast_pattern 1767/head
authorShivani Bhardwaj <shivanib134@gmail.com>
Wed, 3 Apr 2024 07:13:40 +0000 (12:43 +0530)
committerVictor Julien <victor@inliniac.net>
Mon, 15 Apr 2024 08:08:40 +0000 (10:08 +0200)
Bug 6859

tests/bug-6859/README.md [new file with mode: 0644]
tests/bug-6859/test.rules [new file with mode: 0644]
tests/bug-6859/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-6859/README.md b/tests/bug-6859/README.md
new file mode 100644 (file)
index 0000000..0ac9274
--- /dev/null
@@ -0,0 +1,9 @@
+# Test Description
+This test demonstrates that fast_pattern along with base64_data
+should lead to an Info message about it being an ineffective operation.
+
+## PCAP
+None
+
+## Related issues
+https://redmine.openinfosecfoundation.org/issues/6859
diff --git a/tests/bug-6859/test.rules b/tests/bug-6859/test.rules
new file mode 100644 (file)
index 0000000..4b72db7
--- /dev/null
@@ -0,0 +1 @@
+alert http $HOME_NET any -> $EXTERNAL_NET any (flow:established,to_server; http.method; content:"POST"; http.request_body; base64_decode:bytes 28; base64_data; content:"something"; fast_pattern; classtype:bad-unknown; sid:123; rev:1;)
diff --git a/tests/bug-6859/test.yaml b/tests/bug-6859/test.yaml
new file mode 100644 (file)
index 0000000..a6e3fb6
--- /dev/null
@@ -0,0 +1,11 @@
+requires:
+  pcap: false
+  version: 7
+
+args:
+  - --engine-analysis
+
+checks:
+    - shell:
+        args: grep "fast_pattern is ineffective with base64_data" suricata.log | grep "Info" | wc -l
+        expect: 1