Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dns over http2 5773 v4 #1734

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/dns-over-http2-post/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Description

Test DNS over HTTP2 with POST
https://redmine.openinfosecfoundation.org/issues/5773

# PCAP

The pcap comes from https://redmine.openinfosecfoundation.org/issues/5773

Binary file not shown.
25 changes: 25 additions & 0 deletions tests/dns-over-http2-post/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
requires:
min-version: 8.0.0

# disables checksum verification
args:
- -k none

checks:
- filter:
count: 1
match:
event_type: doh2
dns.query[0].type: query
dns.query[0].rrname: example.com
dns.query[0].rrtype: NS
dns.answers[0].rrname: example.com
dns.answers[0].rrtype: NS
dns.answers[0].rdata: b.iana-servers.net
dns.grouped.NS[0]: b.iana-servers.net
- filter:
count: 1
match:
event_type: flow
app_proto: doh2
app_proto_orig: http2
9 changes: 9 additions & 0 deletions tests/dns-over-http2/README.md
Original file line number Diff line number Diff line change
@@ -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

Binary file added tests/dns-over-http2/dns_over_https.pcap
Binary file not shown.
7 changes: 7 additions & 0 deletions tests/dns-over-http2/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alert http2 any any -> any any (http.uri; content: "/dns"; sid:10; )
alert doh2 any any -> any any (http.uri; content: "/dns"; sid:11; )
alert dns any any -> any any (dns.query; content: "www.gstatic.com"; sid:20; )
alert doh2 any any -> any any (dns.query; content: "www.gstatic.com"; sid:21; )
alert http2 any any -> any any (http2.frametype:6; sid:30; )
alert doh2 any any -> any any (http2.frametype:6; sid:31; )
alert doh2 any any -> any any (dns.opcode: 0; http.host; content: "dns.google"; sid:40; )
73 changes: 73 additions & 0 deletions tests/dns-over-http2/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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: 4
match:
event_type: alert
alert.signature_id: 11
- filter:
count: 2
match:
event_type: alert
alert.signature_id: 20
- filter:
count: 2
match:
event_type: alert
alert.signature_id: 21
- filter:
count: 4
match:
event_type: alert
alert.signature_id: 30
- filter:
count: 4
match:
event_type: alert
alert.signature_id: 31
- filter:
count: 4
match:
event_type: alert
alert.signature_id: 40
- filter:
count: 2
match:
event_type: doh2
dns.query[0].type: query
dns.query[0].rrname: www.gstatic.com
- filter:
count: 2
match:
event_type: doh2
dns.query[0].type: query
dns.query[0].rrname: nav-edge.smartscreen.microsoft.com
- filter:
count: 2
match:
event_type: doh2
dns.type: answer
dns.rrname: www.gstatic.com
- filter:
count: 2
match:
event_type: doh2
dns.type: answer
dns.rrname: nav-edge.smartscreen.microsoft.com
- filter:
count: 1
match:
event_type: flow
app_proto: doh2
app_proto_orig: http2
Loading