This commit verifies that the "metadata" element, if any, is in the
proper place within anomaly event records.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - eve-log:
+ enabled: yes
+ metadata: yes
+ filetype: regular
+ types:
+ - anomaly:
+ types:
+ stream: yes
+ applayer: no
--- /dev/null
+alert ip any any -> any any (msg:"ET CNC Shadowserver Reported CnC Server Port 80 Group 1"; flowbits:set,ET.Evil; flowbits:set,ET.BotccIP; sid:1; rev:1;)
--- /dev/null
+requires:
+ min-version: 6
+
+args:
+ - -k none
+
+checks:
+ - filter:
+ count: 1
+ match:
+ event_type: anomaly
+ anomaly.type: stream
+ anomaly.event: stream.pkt_invalid_timestamp
+ metadata.flowbits[0]: "ET.Evil"
+
+ - filter:
+ count: 0
+ match:
+ event_type: anomaly
+ anomaly.type: decode
+
+ - filter:
+ count: 0
+ match:
+ event_type: anomaly
+ anomaly.type: applayer