From: Simon Dugas Date: Thu, 10 Sep 2020 21:04:40 +0000 (+0000) Subject: dns: add test for NULL record X-Git-Tag: suricata-6.0.4~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=839bf66f10e04a87fc7317cd375aa732290b0f44;p=thirdparty%2Fsuricata-verify.git dns: add test for NULL record Add test case to show that NULL record types are being logged. --- diff --git a/tests/dns-udp-null/README.md b/tests/dns-udp-null/README.md new file mode 100644 index 000000000..7d14453ce --- /dev/null +++ b/tests/dns-udp-null/README.md @@ -0,0 +1,4 @@ +Verify the eve output for a DNS response with a NULL record type. + +The pcap contains the first two packets of +https://redmine.openinfosecfoundation.org/attachments/2062. diff --git a/tests/dns-udp-null/dns-tunnel-iodine.pcap b/tests/dns-udp-null/dns-tunnel-iodine.pcap new file mode 100644 index 000000000..0b7252687 Binary files /dev/null and b/tests/dns-udp-null/dns-tunnel-iodine.pcap differ diff --git a/tests/dns-udp-null/suricata.yaml b/tests/dns-udp-null/suricata.yaml new file mode 100644 index 000000000..5f7eded22 --- /dev/null +++ b/tests/dns-udp-null/suricata.yaml @@ -0,0 +1,10 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filename: eve.json + types: + - dns: + version: 1 diff --git a/tests/dns-udp-null/test.yaml b/tests/dns-udp-null/test.yaml new file mode 100644 index 000000000..f7ab52297 --- /dev/null +++ b/tests/dns-udp-null/test.yaml @@ -0,0 +1,19 @@ +requires: + script: + - grep -q parse_rdata_null rust/src/dns/parser.rs + +checks: + - filter: + count: 1 + match: + event_type: dns + dns.type: query + dns.rrtype: "NULL" + - filter: + count: 1 + match: + event_type: dns + dns.type: answer + dns.rcode: NOERROR + dns.rrtype: "NULL" + dns.rdata: "VACKD\u0003\\xc5\\xe9\u0001"