From: Victor Julien Date: Fri, 27 Jan 2023 13:38:30 +0000 (+0100) Subject: tests: improve frame gap tests X-Git-Tag: suricata-6.0.10~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1483908ab2f5474e1620b4fd80a671fc62d26f6c;p=thirdparty%2Fsuricata-verify.git tests: improve frame gap tests Add detection. --- diff --git a/tests/http-gap-simple-frames/test.rules b/tests/http-gap-simple-frames/test.rules new file mode 100644 index 000000000..ea6c01d68 --- /dev/null +++ b/tests/http-gap-simple-frames/test.rules @@ -0,0 +1,5 @@ +alert http any any -> any any (frame:http1.response; content:"|0d 0a|AAA"; sid:1;) +alert http any any -> any any (frame:http1.response; content:"AAA"; endswith; sid:2;) +alert http any any -> any any (frame:http1.stream; content:"AAA"; sid:3;) +# shouldn't match +alert http any any -> any any (frame:http1.response; content:"|0d 0a|AAA"; endswith; sid:4;) diff --git a/tests/http-gap-simple-frames/test.yaml b/tests/http-gap-simple-frames/test.yaml index 78bcdcf1d..c13ac1340 100644 --- a/tests/http-gap-simple-frames/test.yaml +++ b/tests/http-gap-simple-frames/test.yaml @@ -42,7 +42,26 @@ checks: fileinfo.size: 70 fileinfo.state: "TRUNCATED" fileinfo.gaps: true - + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 1 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 2 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 3 + - filter: + count: 0 + match: + event_type: alert + alert.signature_id: 4 - filter: count: 1 match: