@@ -26,15 +26,15 @@ query = '''
2626from .alerts-security.* metadata _id
2727
2828// any alerts excluding low severity and the noisy ones
29- | where kibana.alert.rule.name is not null and user.name is not null and kibana.alert.rule.severity != "low" and
29+ | where kibana.alert.rule.name is not null and user.name is not null and kibana.alert.risk_score > 21 and
3030 not kibana.alert.rule.name in ("Threat Intel IP Address Indicator Match", "Threat Intel Indicator Match", "Agent Spoofing - Mismatched Agent ID") and
3131 not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20")
3232
3333// group alerts by source.ip and extract values of interest for alert triage
3434| stats Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
3535 Esql.rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
3636 Esql.event_category_distinct_count = COUNT_DISTINCT(event.category),
37- Esql.rule_severity_distinct_count = COUNT_DISTINCT(kibana.alert.rule.severity ),
37+ Esql.rule_severity_distinct_count = COUNT_DISTINCT(kibana.alert.risk_score ),
3838 Esql.event_module_values = VALUES(event.module),
3939 Esql.rule_name_values = VALUES(kibana.alert.rule.name),
4040 Esql.message_values = VALUES(message),
@@ -44,7 +44,7 @@ from .alerts-security.* metadata _id
4444 Esql.host_id_values = VALUES(host.id),
4545 Esql.agent_id_values = VALUES(agent.id),
4646 Esql.user_id_values = VALUES(user.id),
47- Esql.rule_severity_values = VALUES(kibana.alert.rule.severity ) by user.name
47+ Esql.rule_severity_values = VALUES(kibana.alert.risk_score ) by user.name
4848
4949// filter for alerts from same destination.ip reported by different integrations with unique categories and with different severity levels
5050| where Esql.event_module_distinct_count >= 2 and Esql.event_category_distinct_count >= 2 and Esql.rule_severity_distinct_count >= 2
0 commit comments