text code block:FROM logs-suricata.* // high severity alerts | where event.module == "suricata" and event.kind == "signal" and event.severity == 1 | STATS Esql.alerts_count = count(*), Esql.first_time_seen = MIN(@timestamp), Esql.distinct_count_src_ip = COUNT_DISTINCT(source.ip), Esql.distinct_count_dst_ip = COUNT_DISTINCT(destination.ip), src_ip_values = VALUES(source.ip), dst_ip_values = VALUES(destination.ip), url_dom = VALUES(url.domain), url_path = VALUES(url.path) by rule.name, event.type | eval Esql.recent = DATE_DIFF("minute", Esql.first_time_seen, now()) // first time seen is within 10m of the rule execution time | where Esql.recent <= 10 and // exclude high volume alerts such as vuln-scanners Esql.alerts_count <= 5 and Esql.distinct_count_src_ip <= 2 and Esql.distinct_count_dst_ip <= 2 // move dynamic fields to ECS quivalent for rule exceptions | eval source.ip = MV_FIRST(src_ip_values), destination.ip = MV_FIRST(dst_ip_values), url.domain = MV_FIRST(url_dom), url.path = MV_FIRST(url_path) | keep rule.name, event.type, Esql.*, source.ip, destination.ip, url.domain, url.path
Install detection rules in Elastic Security
Detect Newly Observed High Severity Suricata Alert in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).