{% set es = salt['pillar.get']('global:managerip', '') %} {% set hivehost = salt['pillar.get']('global:managerip', '') %} {% set hivekey = salt['pillar.get']('global:hivekey', '') %} {% set MANAGER = salt['pillar.get']('manager:url_base', '') %} # Elastalert rule to forward Suricata alerts from Security Onion to a specified TheHive instance. # es_host: {{es}} es_port: 9200 name: Suricata-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","source.ip","destination.ip"] realert: days: 1 filter: - query: query_string: query: "event.module: suricata AND rule.severity:(1 OR 2)" 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: "`SOC Hunt Pivot:` \n\n \n\n `Kibana Dashboard Pivot:` \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]}'