alert.signature_id: 1
alert.extra.src_ip.test: success
alert.extra.bad_host.year: 2005
+ alert.extra.src_ip.ip: "10.16.1.11"
+ alert.extra.bad_host.host: "www.testmyids.com"
--- /dev/null
+{"host": "testmyids.com", "context":"gold old test", "year": 2005}
+{"host": "www.testmyids.com", "context":"gold old test", "year": 2005}
--- /dev/null
+{"ip": "10.16.1.11", "test": "success", "context":3}
+{"ip": "10.16.1.12", "test": "fail", "context":4}
--- /dev/null
+alert http any any -> any any (flow:established,to_server; http.host; dataset:isset,badhost,type string,load host.lst,format jsonline,enrichment_key bad_host,remove_key, value_key host; ip.src; dataset:isset,src_ip,type ip,load src.lst,format jsonline,enrichment_key src_ip,value_key ip, remove_key; sid:1;)
--- /dev/null
+requires:
+ min-version: 8
+
+pcap: ../datajson-01-ip/input.pcap
+
+args:
+ - -k none --set datasets.enabled=yes
+
+checks:
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ alert.extra.src_ip.test: success
+ alert.extra.bad_host.year: 2005
+ - filter:
+ count: 0
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ alert.extra.src_ip.test: success
+ alert.extra.src_ip.ip: 10.16.1.11
+ alert.extra.bad_host.year: 2005
+ - filter:
+ count: 0
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ alert.extra.src_ip.test: success
+ alert.extra.bad_host.host: www.testmyids.com
--- /dev/null
+{"ioc": {"host": "testmyids.com"}, "context":"gold old test", "year": 2005}
+{"ioc": {"host": "www.testmyids.com"}, "context":"gold old test", "year": 2005}
--- /dev/null
+{"ip": "10.16.1.11", "test": "success", "context":3}
+{"ip": "10.16.1.12", "test": "fail", "context":4}
--- /dev/null
+alert http any any -> any any (flow:established,to_server; http.host; dataset:isset,badhost,type string,load host.lst,format jsonline,enrichment_key bad_host,value_key ioc.host,remove_key; ip.src; dataset:isset,src_ip,type ip,load src.lst,format jsonline,enrichment_key src_ip,value_key ip; sid:1;)
--- /dev/null
+requires:
+ min-version: 8
+
+pcap: ../datajson-01-ip/input.pcap
+
+args:
+ - -k none --set datasets.enabled=yes
+
+checks:
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ alert.extra.src_ip.test: success
+ alert.extra.bad_host.year: 2005
+ alert.extra.src_ip.ip: "10.16.1.11"
+ - filter:
+ count: 0
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ alert.extra.src_ip.test: success
+ alert.extra.bad_host.year: 2005
+ alert.extra.src_ip.ip: "10.16.1.11"
+ alert.extra.bad_host.host: "www.testmyids.com"