mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #10550 from Security-Onion-Solutions/kilo
Elastalert and EQL
This commit is contained in:
@@ -13,7 +13,6 @@ elastalert:
|
|||||||
es_port: 9200
|
es_port: 9200
|
||||||
es_conn_timeout: 55
|
es_conn_timeout: 55
|
||||||
max_query_size: 5000
|
max_query_size: 5000
|
||||||
eql: true
|
|
||||||
use_ssl: true
|
use_ssl: true
|
||||||
verify_certs: false
|
verify_certs: false
|
||||||
writeback_index: elastalert
|
writeback_index: elastalert
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class PlaybookESAlerter(Alerter):
|
|||||||
creds = (self.rule['es_username'], self.rule['es_password'])
|
creds = (self.rule['es_username'], self.rule['es_password'])
|
||||||
|
|
||||||
payload = {"rule": { "name": self.rule['play_title'],"case_template": self.rule['play_id'],"uuid": self.rule['play_id'],"category": self.rule['rule.category']},"event":{ "severity": self.rule['event.severity'],"module": self.rule['event.module'],"dataset": self.rule['event.dataset'],"severity_label": self.rule['sigma_level']},"kibana_pivot": self.rule['kibana_pivot'],"soc_pivot": self.rule['soc_pivot'],"play_url": self.rule['play_url'],"sigma_level": self.rule['sigma_level'],"event_data": match, "@timestamp": timestamp}
|
payload = {"rule": { "name": self.rule['play_title'],"case_template": self.rule['play_id'],"uuid": self.rule['play_id'],"category": self.rule['rule.category']},"event":{ "severity": self.rule['event.severity'],"module": self.rule['event.module'],"dataset": self.rule['event.dataset'],"severity_label": self.rule['sigma_level']},"kibana_pivot": self.rule['kibana_pivot'],"soc_pivot": self.rule['soc_pivot'],"play_url": self.rule['play_url'],"sigma_level": self.rule['sigma_level'],"event_data": match, "@timestamp": timestamp}
|
||||||
url = f"{self.rule['es_hosts']}/logs-playbook.alerts-so/_doc/"
|
url = f"https://{self.rule['es_host']}:{self.rule['es_port']}/logs-playbook.alerts-so/_doc/"
|
||||||
requests.post(url, data=json.dumps(payload), headers=headers, verify=False, auth=creds)
|
requests.post(url, data=json.dumps(payload), headers=headers, verify=False, auth=creds)
|
||||||
|
|
||||||
def get_info(self):
|
def get_info(self):
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{% set elastalert_pillar = salt['pillar.get']('elastalert:config', {}) %}
|
{% set elastalert_pillar = salt['pillar.get']('elastalert:config', {}) %}
|
||||||
|
|
||||||
|
|
||||||
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_hosts': 'https://' + GLOBALS.manager + ':' + ELASTALERTDEFAULTS.elastalert.config.es_port|string}) %}
|
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_host': GLOBALS.manager}) %}
|
||||||
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_username': pillar.elasticsearch.auth.users.so_elastic_user.user}) %}
|
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_username': pillar.elasticsearch.auth.users.so_elastic_user.user}) %}
|
||||||
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_password': pillar.elasticsearch.auth.users.so_elastic_user.pass}) %}
|
{% do ELASTALERTDEFAULTS.elastalert.config.update({'es_password': pillar.elasticsearch.auth.users.so_elastic_user.pass}) %}
|
||||||
|
|
||||||
|
|||||||
@@ -20,5 +20,3 @@ realert:
|
|||||||
minutes: 0
|
minutes: 0
|
||||||
type: any
|
type: any
|
||||||
filter:
|
filter:
|
||||||
- query:
|
|
||||||
query_string:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user