From e7d6ee7dbbe413b9c5719be22c52a7183325d934 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 5 Dec 2023 14:10:42 +0100 Subject: [PATCH] dns: adds test for dns over http2 Ticket: 5773 --- tests/dns-over-http2/README.md | 9 +++++ tests/dns-over-http2/dns_over_https.pcap | Bin 0 -> 5188 bytes tests/dns-over-http2/test.rules | 2 + tests/dns-over-http2/test.yaml | 47 +++++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 tests/dns-over-http2/README.md create mode 100644 tests/dns-over-http2/dns_over_https.pcap create mode 100644 tests/dns-over-http2/test.rules create mode 100644 tests/dns-over-http2/test.yaml diff --git a/tests/dns-over-http2/README.md b/tests/dns-over-http2/README.md new file mode 100644 index 000000000..f9fb01d63 --- /dev/null +++ b/tests/dns-over-http2/README.md @@ -0,0 +1,9 @@ +# Description + +Test DNS over HTTP2 +https://redmine.openinfosecfoundation.org/issues/5773 + +# PCAP + +The pcap comes from https://redmine.openinfosecfoundation.org/issues/5773 + diff --git a/tests/dns-over-http2/dns_over_https.pcap b/tests/dns-over-http2/dns_over_https.pcap new file mode 100644 index 0000000000000000000000000000000000000000..afc2809a455419a9c6b563f44439f128e6528655 GIT binary patch literal 5188 zcmeHLYj6`)6h50x+O#HV3knq}k3lLF0%uV z{*y6W9)LfG-kpY5L86!CN_GdD>9IPlCth&^ew7v_E-EeWAA4w^Vv*b(mOjS0>)El> z-)-UMz9Glw5FSq-t1qymz!H(zr0vxJXl< z>#}Fiqj&N%(HWKhNxC|E__(B$4&@aI-}Rrs#mp(*Gkj6`KEuNJ;;qriZv(7h*6?Tz zS6X!7?z3Wl&Az?FYdr=h4P8!6DvZ|#p@MN~y&oenTHJmEvY^u{n$yk`ZHzEvU}VGb zH;6?Zyb%rqj#jH^0MO%IYEogV#R^}r)k=Ih$L+@_d(&z=G0RZoxV%VV=eM#zaHknu zv7hq2QTav&x0-Mya7s0gaiiF=8#ljLMl2IrSVna8gNyURofmKdm&TDZIQ^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!tS?1^Kl4&#LxK1>ZFfi!-{W3J_=f9h7>ReONrmALbo|Kh?Y>(99|I8F zOv$00L36xsGN71CkkL2P0d{D|PYlxH2l=oUa$_1n`tHz7(``32fi(S@!RGtHKJJBm zl@%s($`1&p1!SmcDLSg{TE~F}IOd)wp_nLq dDnm&UQIP0?bV+9@8b4i9Q5QM=vsQ^HzXL^{>!|<$ literal 0 HcmV?d00001 diff --git a/tests/dns-over-http2/test.rules b/tests/dns-over-http2/test.rules new file mode 100644 index 000000000..deebb56d5 --- /dev/null +++ b/tests/dns-over-http2/test.rules @@ -0,0 +1,2 @@ +alert http2 any any -> any any (http.uri; content: "/dns"; sid:10; ) +alert dns any any -> any any (dns.query; content: "www.gstatic.com"; sid:20; ) diff --git a/tests/dns-over-http2/test.yaml b/tests/dns-over-http2/test.yaml new file mode 100644 index 000000000..22161e704 --- /dev/null +++ b/tests/dns-over-http2/test.yaml @@ -0,0 +1,47 @@ +requires: + min-version: 8.0.0 + +# disables checksum verification +args: + - -k none + +checks: + - filter: + count: 4 + match: + event_type: alert + alert.signature_id: 10 + - filter: + count: 2 + match: + event_type: alert + alert.signature_id: 20 + - filter: + count: 2 + match: + event_type: dns + dns.type: query + dns.rrname: www.gstatic.com + - filter: + count: 2 + match: + event_type: dns + dns.type: query + dns.rrname: nav-edge.smartscreen.microsoft.com + - filter: + count: 2 + match: + event_type: dns + dns.type: answer + dns.rrname: www.gstatic.com + - filter: + count: 2 + match: + event_type: dns + dns.type: answer + dns.rrname: nav-edge.smartscreen.microsoft.com + - filter: + count: 1 + match: + event_type: flow + app_proto: http2