From: Victor Julien Date: Sat, 10 Jan 2026 19:52:41 +0000 (+0100) Subject: tests: add bug 7842 test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63d11ef566876906b216ebe21c615f4de87ff89f;p=thirdparty%2Fsuricata-verify.git tests: add bug 7842 test --- diff --git a/tests/bug-7842-01/base64_0x27_detptr_bug.pcap b/tests/bug-7842-01/base64_0x27_detptr_bug.pcap new file mode 100644 index 000000000..e524254f6 Binary files /dev/null and b/tests/bug-7842-01/base64_0x27_detptr_bug.pcap differ diff --git a/tests/bug-7842-01/test.rules b/tests/bug-7842-01/test.rules new file mode 100644 index 000000000..3b818c1e7 --- /dev/null +++ b/tests/bug-7842-01/test.rules @@ -0,0 +1,8 @@ +alert http any any -> any any (flow:established,to_server; http.method; content:"POST"; http.request_body; content:"|27|"; base64_decode:relative; base64_data; content:"|ff ff ff ff|"; within:16; content:".PSObject"; distance:0; content:"|2f|RunspaceInvoke"; sid:2;) + +alert http any any -> any any (flow:established,to_server; http.method; content:"POST"; http.request_body; content:"|27|"; base64_decode:relative; base64_data; content:"|ff 01|"; within:2; content:".PSObject"; distance:0; content:"|2f|RunspaceInvoke"; sid:3;) + +# strict depth version +alert http any any -> any any (flow:established,to_server; http.method; content:"POST"; http.request_body; content:"|27|"; base64_decode:relative; base64_data; content:"|00 01 00 00 00 ff ff ff ff|"; depth:9; content:".PSObject"; distance:0; content:"|2f|RunspaceInvoke"; sid:11;) +# strict within version +alert http any any -> any any (flow:established,to_server; http.method; content:"POST"; http.request_body; content:"|27|"; base64_decode:relative; base64_data; content:"|00 01 00 00 00 ff ff ff ff|"; within:9; content:".PSObject"; distance:0; content:"|2f|RunspaceInvoke"; sid:12;) diff --git a/tests/bug-7842-01/test.yaml b/tests/bug-7842-01/test.yaml new file mode 100644 index 000000000..b78d77608 --- /dev/null +++ b/tests/bug-7842-01/test.yaml @@ -0,0 +1,27 @@ +requires: + min-version: 9 + +args: + - -k none + +checks: + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 2 + - filter: + count: 0 + match: + event_type: alert + alert.signature_id: 3 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 11 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 12