Extend an existing test to check that the DNS object exists
on a DNS alert.
- eve-log:
enabled: true
types:
+ - alert:
- dns:
enabled: true
version: 2
--- /dev/null
+alert dns any any -> any any (msg:"TEST dns_query"; dns_query; content:"suricata-ids.org"; sid:1; rev:1;)
features:
- HAVE_LIBJANSSON
min-version: 4.1.0
- script:
- - grep OutputAnswerV2 src/output-json-dns.c > /dev/null 2>&1
checks:
dns.answers[0].rrtype: CNAME
dns.answers[1].rrtype: A
dns.answers[2].rrtype: A
+
+ # Check that the alert contains a DNS object.
+ - filter:
+ count: 1
+ comment: alert with dns object
+ match:
+ event_type: alert
+ dns.query[0].type: query