From: Jason Ish Date: Mon, 14 Feb 2022 14:49:16 +0000 (-0600) Subject: dns: test DNS frames X-Git-Tag: suricata-5.0.10~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d0f4c93fadb18d0307efaa602e1c966c29bf37;p=thirdparty%2Fsuricata-verify.git dns: test DNS frames --- diff --git a/tests/dns/dns-frames/input.pcap b/tests/dns/dns-frames/input.pcap new file mode 100644 index 000000000..21a29964b Binary files /dev/null and b/tests/dns/dns-frames/input.pcap differ diff --git a/tests/dns/dns-frames/test.rules b/tests/dns/dns-frames/test.rules new file mode 100644 index 000000000..6303c1d04 --- /dev/null +++ b/tests/dns/dns-frames/test.rules @@ -0,0 +1,8 @@ +# These 2 rules are trying to verify that the TCP and UDP PDU +# frame are showing the same data for similar requests. +alert tcp any any -> any any (msg:"DNS UDP Frame"; flow:to_server; \ + frame:dns.pdu; content:"|01 20 00 01|"; offset:2; \ + content:"suricata"; offset:13; sid:1; rev:1;) +alert udp any any -> any any (msg:"DNS UDP Frame"; flow:to_server; \ + frame:dns.pdu; content:"|01 20 00 01|"; offset:2; \ + content:"suricata"; offset:13; sid:2; rev:1;) diff --git a/tests/dns/dns-frames/test.yaml b/tests/dns/dns-frames/test.yaml new file mode 100644 index 000000000..1ba2b64fd --- /dev/null +++ b/tests/dns/dns-frames/test.yaml @@ -0,0 +1,15 @@ +requires: + min-version: 7 + +args: +- -k none + +checks: +- filter: + count: 1 + match: + alert.signature_id: 1 +- filter: + count: 1 + match: + alert.signature_id: 2