From: Simon Dugas Date: Tue, 7 Apr 2020 17:40:29 +0000 (+0000) Subject: tests/dns: add test for logging SOA fields X-Git-Tag: suricata-6.0.4~207 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F378%2Fhead;p=thirdparty%2Fsuricata-verify.git tests/dns: add test for logging SOA fields test config and pcap were copied from an existing test dns-udp-nxdomain-soa --- diff --git a/tests/dns-eve-v2-udp-nxdomain-soa/README.md b/tests/dns-eve-v2-udp-nxdomain-soa/README.md new file mode 100644 index 000000000..8b72d06f2 --- /dev/null +++ b/tests/dns-eve-v2-udp-nxdomain-soa/README.md @@ -0,0 +1,2 @@ +Verify the fields of an SOA authority record in a DNS response that +failed with NXDOMAIN error for eve dns version 2. diff --git a/tests/dns-eve-v2-udp-nxdomain-soa/dns-udp-nxdomain-soa.pcap b/tests/dns-eve-v2-udp-nxdomain-soa/dns-udp-nxdomain-soa.pcap new file mode 100644 index 000000000..eb47badda Binary files /dev/null and b/tests/dns-eve-v2-udp-nxdomain-soa/dns-udp-nxdomain-soa.pcap differ diff --git a/tests/dns-eve-v2-udp-nxdomain-soa/suricata.yaml b/tests/dns-eve-v2-udp-nxdomain-soa/suricata.yaml new file mode 100644 index 000000000..4db348acd --- /dev/null +++ b/tests/dns-eve-v2-udp-nxdomain-soa/suricata.yaml @@ -0,0 +1,10 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filename: eve.json + types: + - dns: + version: 2 diff --git a/tests/dns-eve-v2-udp-nxdomain-soa/test.yaml b/tests/dns-eve-v2-udp-nxdomain-soa/test.yaml new file mode 100644 index 000000000..43855d612 --- /dev/null +++ b/tests/dns-eve-v2-udp-nxdomain-soa/test.yaml @@ -0,0 +1,21 @@ +requires: + min-version: 6.0.0 + features: + - HAVE_LIBJANSSON + +checks: + - filter: + count: 1 + match: + event_type: dns + dns.rcode: NXDOMAIN + dns.authorities[0].rrname: oisf.net + dns.authorities[0].rrtype: SOA + dns.authorities[0].ttl: 899 + dns.authorities[0].soa.mname: ns-110.awsdns-13.com + dns.authorities[0].soa.rname: awsdns-hostmaster.amazon.com + dns.authorities[0].soa.serial: 1 + dns.authorities[0].soa.refresh: 7200 + dns.authorities[0].soa.retry: 900 + dns.authorities[0].soa.expire: 1209600 + dns.authorities[0].soa.minimum: 86400