Sample captures, DNS

DNS lookup

An A query for c2.badexample.net and its answer.

Packets
2
Duration
0.021 s
Size
243 bytes
Protocols
UDP, DNS
License
CC0

What it shows

One DNS query over UDP and its answer: c2.badexample.net resolves to 203.0.113.66.

Suricata matches the name with dns.query. Snort 3 has no DNS name buffer, so the name has to be written as it appears on the wire, a length byte before each label: |02|c2|0a|badexample|03|net|00|.

Rules for this capture

Suricata 8 and 7

Try these rules
alert dns any any -> any any (msg:"Lookup of c2.badexample.net"; dns.query; content:"c2.badexample.net"; nocase; sid:1000001; rev:1;)
alert udp any any -> any 53 (msg:"Lookup of c2.badexample.net"; content:"|02|c2|0a|badexample|03|net|00|", nocase; sid:1000001; rev:1;)

Packets

No.TimeSourceDestinationProtocolInfo
10.000192.0.2.10:53111198.51.100.53:53UDPDNS query A c2.badexample.net
20.021198.51.100.53:53192.0.2.10:53111UDPDNS answer A c2.badexample.net

More DNS samples