Skip to content

Commit

Permalink
dns: adds test for dns over http2
Browse files Browse the repository at this point in the history
Ticket: 5773
  • Loading branch information
catenacyber committed Dec 5, 2023
1 parent 4de2a8c commit e7d6ee7
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
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.
2 changes: 2 additions & 0 deletions tests/dns-over-http2/test.rules
Original file line number Diff line number Diff line change
@@ -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; )
47 changes: 47 additions & 0 deletions tests/dns-over-http2/test.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e7d6ee7

Please sign in to comment.