text code block:from logs-network_traffic.tls* | where source.ip is not null and destination.ip is not null and ( ( tls.detailed.client_hello.extensions.application_layer_protocol_negotiation == "acme-tls/1" and tls.established == false ) or ( CONTAINS(TO_LOWER(tls.detailed.client_hello.extensions._unparsed_), "alpn") and tls.detailed.alert_types in ("decode_error", "illegal_parameter") ) ) | stats Esql.event_count = COUNT(*), Esql.destination_port_values = MV_SLICE(MV_DEDUPE(TOP(destination.port, 10, "asc")), 0, 10), Esql.network_community_id_values = MV_SLICE(MV_DEDUPE(TOP(network.community_id, 10, "asc")), 0, 10), Esql.alpn_values = MV_SLICE( MV_DEDUPE(TOP(tls.detailed.client_hello.extensions.application_layer_protocol_negotiation, 10, "asc")), 0, 10 ), Esql.alert_type_values = MV_SLICE(MV_DEDUPE(TOP(tls.detailed.alert_types, 10, "asc")), 0, 10) by source.ip, destination.ip | where Esql.event_count >= 5 | keep source.ip, destination.ip, Esql.event_count, Esql.destination_port_values, Esql.network_community_id_values, Esql.alpn_values, Esql.alert_type_values
Install detection rules in Elastic Security
Detect Repeated Stalled TLS Handshakes via ALPN acme-tls/1 Extension 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).