From: Jeff Lucovsky Date: Sat, 23 Jan 2021 20:26:33 +0000 (-0500) Subject: bug-4199: Add test for forum-reported issue X-Git-Tag: suricata-6.0.4~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F460%2Fhead;p=thirdparty%2Fsuricata-verify.git bug-4199: Add test for forum-reported issue --- diff --git a/tests/bug-4199-2/input.pcap b/tests/bug-4199-2/input.pcap new file mode 100644 index 000000000..b72b4a70f Binary files /dev/null and b/tests/bug-4199-2/input.pcap differ diff --git a/tests/bug-4199-2/test.rules b/tests/bug-4199-2/test.rules new file mode 100644 index 000000000..cf09b905f --- /dev/null +++ b/tests/bug-4199-2/test.rules @@ -0,0 +1,2 @@ +alert http any any -> any any (msg:"detect XSS #1)"; flow:established,to_server; http.request_body; url_decode; content:"("; nocase; fast_pattern; sid:1;) +alert http any any -> any any (msg:"]detect XSS #2)"; flow:established,to_server; http.request_body; pcre:"/\b(fromcharcode|alert|eval)\s*/Pi"; sid:2;) diff --git a/tests/bug-4199-2/test.yaml b/tests/bug-4199-2/test.yaml new file mode 100644 index 000000000..9e7738465 --- /dev/null +++ b/tests/bug-4199-2/test.yaml @@ -0,0 +1,18 @@ +requires: + min-version: 7 + +args: +- -k none + +checks: + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 1 + + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 2