The idea with this test is to alert on the first time something
is seen in a state type dataset.
--- /dev/null
+Test dataset isnotseen for state. The idea is to check the first occurrence of
+something happening. Then once recorded in the state, isnotset should not
+match.
--- /dev/null
+alert dns any any -> any any (dns.query; to_md5; \
+ dataset:isnotset, dns-seen.md5, type md5, state dns-seen.md5; \
+ dataset:set, dns-seen.md5; \
+ sid:1; rev:1;)
--- /dev/null
+requires:
+ min-version: 5.0.0
+
+pcap: ../datasets-05-state/input.pcap
+
+args:
+ - --data-dir ./output
+
+checks:
+ - filter:
+ count: 1
+ match:
+ alert.signature_id: 1