{% set es = salt['pillar.get']('static:masterip', '') %} {% set hivehost = salt['pillar.get']('static:masterip', '') %} {% set hivekey = salt['pillar.get']('static:hivekey', '') %} # hive.yaml # Elastalert rule to forward IDS alerts from Security Onion to a specified TheHive instance. # es_host: {{es}} es_port: 9200 name: NIDS-Alert type: frequency index: "so-ids-*" num_events: 1 timeframe: minutes: 10 buffer_time: minutes: 10 allow_buffer_time_overlap: true query_key: ["rule.uuid"] realert: days: 1 filter: - query: query_string: query: "event.module: suricata" alert: hivealerter hive_connection: hive_host: http://{{hivehost}} hive_port: 9000/thehive hive_apikey: {{hivekey}} hive_proxies: http: '' https: '' hive_alert_config: title: '{match[rule][name]}' type: 'NIDS' source: 'SecurityOnion' description: "`Hunting Pivot:` \n\n \n\n `Kibana Dashboard:` \n\n \n\n `IPs: `{match[source][ip]}:{match[source][port]} --> {match[destination][ip]}:{match[destination][port]} \n\n `Signature:`{match[rule][rule]}" severity: 2 tags: ['{match[rule][uuid]}','{match[source][ip]}','{match[destination][ip]}'] tlp: 3 status: 'New' follow: True hive_observable_data_mapping: - ip: '{match[source][ip]}' - ip: '{match[destination][ip]}'