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

diff --git a/tests/dns/dns-udp-eve-log-srv/test.yaml b/tests/dns/dns-udp-eve-log-srv/test.yaml
new file mode 100644 (file)
index 0000000..3b9a0ca
--- /dev/null
@@ -0,0 +1,32 @@
+requires:
+  min-version: 8
+
+args:
+  - -k none
+
+checks:
+
+  - filter:
+      count: 1
+      match:
+        event_type: dns
+        dns.type: request
+        dns.queries[0].rrname: _sip._udp.sip.voice.google.com
+        dns.queries[0].rrtype: SRV
+
+  - filter:
+      count: 1
+      match:
+        event_type: dns
+        dns.type: response
+        dns.queries[0].rrname: _sip._udp.sip.voice.google.com
+        dns.queries[0].rrtype: SRV
+        dns.rcode: NOERROR
+        dns.answers[0].srv.priority: 20
+        dns.answers[0].srv.weight: 1
+        dns.answers[0].srv.port: 5060
+        dns.answers[0].srv.name: sip-anycast-2.voice.google.com
+        dns.answers[1].srv.priority: 10
+        dns.answers[1].srv.weight: 1
+        dns.answers[1].srv.port: 5060
+        dns.answers[1].srv.name: sip-anycast-1.voice.google.com
diff --git a/tests/dns/v2/dns-udp-eve-log-srv/input.pcap b/tests/dns/v2/dns-udp-eve-log-srv/input.pcap
new file mode 100644 (file)
index 0000000..565399f
Binary files /dev/null and b/tests/dns/v2/dns-udp-eve-log-srv/input.pcap differ
diff --git a/tests/dns/v2/dns-udp-eve-log-srv/suricata.yaml b/tests/dns/v2/dns-udp-eve-log-srv/suricata.yaml
new file mode 100644 (file)
index 0000000..35b34a0
--- /dev/null
@@ -0,0 +1,16 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      filetype: regular
+      filename: eve.json
+      types:
+        - dns:
+            version: 2
+
+app-layer:
+  protocols:
+    dns:
+      enabled: yes