From: Jeff Lucovsky Date: Sat, 12 Dec 2020 15:04:25 +0000 (-0500) Subject: bug-4199: Tests for shared http request body X-Git-Tag: suricata-6.0.4~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16acca6349b629ef00d81cbe7160b3c813239e4d;p=thirdparty%2Fsuricata-verify.git bug-4199: Tests for shared http request body --- diff --git a/tests/bug-4199/input.pcap b/tests/bug-4199/input.pcap new file mode 100644 index 000000000..b9eec15c8 Binary files /dev/null and b/tests/bug-4199/input.pcap differ diff --git a/tests/bug-4199/test.rules b/tests/bug-4199/test.rules new file mode 100644 index 000000000..2cb6dca99 --- /dev/null +++ b/tests/bug-4199/test.rules @@ -0,0 +1,2 @@ +alert http any any -> $HOME_NET any (msg: "detect (/etc/passwd) no transform"; flow:to_server,established; http.request_body;content:"/etc/passwd"; nocase; sid:1;) +alert http any any -> $HOME_NET any (msg: "detect (/etc/passwd) with transform"; flow:to_server,established; http.request_body; url_decode; content:"/etc/passwd"; nocase; sid:2;) diff --git a/tests/bug-4199/test.yaml b/tests/bug-4199/test.yaml new file mode 100644 index 000000000..bea0b2118 --- /dev/null +++ b/tests/bug-4199/test.yaml @@ -0,0 +1,15 @@ +requires: + min-version: 7 + +checks: + - filter: + count: 0 + match: + event_type: alert + alert.signature_id: 1 + + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 2