]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
dns-udp-eve-dig: v2 and v3 tests
authorJason Ish <jason.ish@oisf.net>
Thu, 4 Jul 2024 21:28:59 +0000 (15:28 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 9 Jul 2024 10:15:24 +0000 (12:15 +0200)
tests/dns/dns-udp-eve-dig/README.md [moved from tests/dns-udp-eve-v2-dig/README.md with 100% similarity]
tests/dns/dns-udp-eve-dig/test.yaml [new file with mode: 0644]
tests/dns/v2/dns-udp-eve-dig/README.md [new file with mode: 0644]
tests/dns/v2/dns-udp-eve-dig/test.yaml [moved from tests/dns-udp-eve-v2-dig/test.yaml with 94% similarity]

diff --git a/tests/dns/dns-udp-eve-dig/test.yaml b/tests/dns/dns-udp-eve-dig/test.yaml
new file mode 100644 (file)
index 0000000..4f67429
--- /dev/null
@@ -0,0 +1,60 @@
+requires:
+  min-version: 8
+
+pcap: ../../cond-log-dns-dig/input.pcap
+
+checks:
+- filter:
+    count: 2
+    match:
+      event_type: dns
+- filter:
+    count: 1
+    match:
+      dest_ip: 10.16.1.1
+      dest_port: 53
+      dns.id: 36146
+      dns.queries[0].rrname: www.suricata-ids.org
+      dns.queries[0].rrtype: A
+      dns.tx_id: 0
+      dns.type: request
+      event_type: dns
+      pcap_cnt: 1
+      proto: UDP
+      src_ip: 10.16.1.11
+      src_port: 41805
+- filter:
+    count: 1
+    match:
+      dest_ip: 10.16.1.1
+      dest_port: 53
+      dns.answers[0].rdata: suricata-ids.org
+      dns.answers[0].rrname: www.suricata-ids.org
+      dns.answers[0].rrtype: CNAME
+      dns.answers[0].ttl: 3544
+      dns.answers[1].rdata: 192.0.78.24
+      dns.answers[1].rrname: suricata-ids.org
+      dns.answers[1].rrtype: A
+      dns.answers[1].ttl: 244
+      dns.answers[2].rdata: 192.0.78.25
+      dns.answers[2].rrname: suricata-ids.org
+      dns.answers[2].rrtype: A
+      dns.answers[2].ttl: 244
+      dns.flags: 81a0
+      dns.grouped.A[0]: 192.0.78.24
+      dns.grouped.A[1]: 192.0.78.25
+      dns.grouped.CNAME[0]: suricata-ids.org
+      dns.id: 36146
+      dns.qr: true
+      dns.ra: true
+      dns.rcode: NOERROR
+      dns.rd: true
+      dns.queries[0].rrname: www.suricata-ids.org
+      dns.queries[0].rrtype: A
+      dns.type: response
+      dns.version: 3
+      event_type: dns
+      pcap_cnt: 2
+      proto: UDP
+      src_ip: 10.16.1.11
+      src_port: 41805
diff --git a/tests/dns/v2/dns-udp-eve-dig/README.md b/tests/dns/v2/dns-udp-eve-dig/README.md
new file mode 100644 (file)
index 0000000..b62bf50
--- /dev/null
@@ -0,0 +1 @@
+DNS EVE v2 test of a dig against www.suricata-ids.org.
similarity index 94%
rename from tests/dns-udp-eve-v2-dig/test.yaml
rename to tests/dns/v2/dns-udp-eve-dig/test.yaml
index 5f6dc7213a917362c43c12bffe15c7abfd378ffb..3fbc4df7fee3806ebc6f395f380aa3a3fe28dfd0 100644 (file)
@@ -1,4 +1,7 @@
-pcap: ../cond-log-dns-dig/input.pcap
+env:
+  SURICATA_EVE_DNS_VERSION: 2
+
+pcap: ../../../cond-log-dns-dig/input.pcap
 
 checks:
 - filter: