11[metadata ]
22creation_date = " 2021/07/14"
3+ integration = [" endpoint" ]
34maturity = " production"
4- updated_date = " 2025/01/15 "
5+ updated_date = " 2025/11/13 "
56
67[rule ]
78author = [" Elastic" ]
@@ -17,19 +18,22 @@ false_positives = [
1718 """ ,
1819]
1920from = " now-9m"
20- index = [" logs-*" , " metrics-*" , " traces-*" ]
21- language = " kuery"
21+ language = " esql"
2222license = " Elastic License v2"
2323name = " Agent Spoofing - Multiple Hosts Using Same Agent"
2424risk_score = 73
2525rule_id = " 493834ca-f861-414c-8602-150d5505b777"
2626severity = " high"
2727tags = [" Use Case: Threat Detection" , " Tactic: Defense Evasion" , " Resources: Investigation Guide" ]
2828timestamp_override = " event.ingested"
29- type = " threshold "
29+ type = " esql "
3030
3131query = '''
32- event.agent_id_status:* and not tags:forwarded
32+ from logs-endpoint.* metadata _id
33+ | where event.agent_id_status is not null
34+ | stats Esql.count_distinct_host_ids = count_distinct(host.id), Esql.host_id_values = values(host.id), Esql.user_id_values_user_id = values(user.id) by agent.id
35+ | where Esql.count_distinct_host_ids >= 2
36+ | keep Esql.count_distinct_host_ids, Esql.host_id_values, Esql.user_id_values_user_id, agent.id
3337'''
3438note = """ ## Triage and analysis
3539
@@ -80,11 +84,4 @@ id = "TA0005"
8084name = " Defense Evasion"
8185reference = " https://attack.mitre.org/tactics/TA0005/"
8286
83- [rule .threshold ]
84- field = [" agent.id" ]
85- value = 2
86- [[rule .threshold .cardinality ]]
87- field = " host.id"
88- value = 2
89-
9087
0 commit comments