Credential Access (TA0006)(external, opens in a new tab or window)
text code block:from logs-network_traffic.dhcpv4-*, packetbeat-* | eval message_type = TO_LOWER(COALESCE(network_traffic.dhcpv4.option.message_type, dhcpv4.option.message_type)), Esql.transaction_id = COALESCE(network_traffic.dhcpv4.transaction_id, dhcpv4.transaction_id), server_identifier = COALESCE(network_traffic.dhcpv4.option.server_identifier, dhcpv4.option.server_identifier) | where message_type in ("offer", "ack") and Esql.transaction_id is not null and source.ip is not null | eval Esql.time_window = DATE_TRUNC(30 seconds, @timestamp) | stats Esql.count_distinct_servers = COUNT_DISTINCT(source.ip), Esql.values_server_ips = VALUES(source.ip), Esql.values_server_identifiers = VALUES(server_identifier), Esql.count_replies = COUNT(*) by Esql.time_window, Esql.transaction_id | where Esql.count_distinct_servers >= 2 | keep Esql.transaction_id, Esql.time_window, Esql.count_distinct_servers, Esql.values_server_ips, Esql.values_server_identifiers, Esql.count_replies
Install detection rules in Elastic Security
Detect Multiple DHCP Servers Responding to the Same Transaction 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).