Correlated Alerts on Similar User Identities
This rule correlates alerts from multiple integrations and event categories that involve different user.name values which may represent the same real-world identity. It uses an LLM-based similarity analysis to evaluate whether multiple user identifiers (e.g. naming variations, formats, aliases, or domain differences) likely belong to the same person.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/02/12"
3maturity = "production"
4min_stack_comments = "ES|QL COMPLETION and INLINE STATS require Elastic Stack 9.3.0 or later."
5min_stack_version = "9.3.0"
6updated_date = "2026/08/06"
7
8[rule]
9author = ["Elastic"]
10description = """
11This rule correlates alerts from multiple integrations and event categories that involve different user.name values which
12may represent the same real-world identity. It uses an LLM-based similarity analysis to evaluate whether multiple user identifiers
13(e.g. naming variations, formats, aliases, or domain differences) likely belong to the same person.
14"""
15from = "now-60m"
16interval = "30m"
17language = "esql"
18license = "Elastic License v2"
19name = "Correlated Alerts on Similar User Identities"
20references = [
21 "https://www.elastic.co/docs/reference/query-languages/esql/esql-commands#esql-completion",
22 "https://www.elastic.co/docs/explore-analyze/elastic-inference/eis-supported-models",
23 "https://www.elastic.co/security-labs/elastic-advances-llm-security",
24]
25risk_score = 73
26rule_id = "1bb329a5-2168-4da5-b7b9-d42a51deb6dd"
27setup = """## Setup
28
29### LLM Configuration
30
31This rule uses the ES|QL COMPLETION command with Elastic Inference Service Claude Sonnet 4.6
32(`.anthropic-claude-4.6-sonnet-completion`), which is available out-of-the-box in Elastic Cloud deployments
33with an appropriate subscription. See [EIS supported models](https://www.elastic.co/docs/explore-analyze/elastic-inference/eis-supported-models).
34
35To use a different LLM provider (Azure OpenAI, Amazon Bedrock, OpenAI, or Google Vertex), configure a connector
36following the [LLM connector documentation](https://www.elastic.co/docs/explore-analyze/ai-features/llm-guides/llm-connectors)
37and update the `inference_id` parameter in the query to reference your configured connector.
38"""
39severity = "high"
40tags = [
41 "Domain: Identity",
42 "Domain: LLM",
43 "Use Case: Threat Detection",
44 "Use Case: Identity and Access Audit",
45 "Resources: Investigation Guide",
46 "Resources: LLM",
47 "Rule Type: Higher-Order Rule",
48]
49timestamp_override = "event.ingested"
50type = "esql"
51
52query = '''
53from .alerts-security.*
54
55// truncate timestamp to 5-minute window
56| eval Esql.time_window_date_trunc = date_trunc(5 minutes, @timestamp)
57
58// high severity alerts excluding system standard user.ids
59| where kibana.alert.rule.name is not null and user.name is not null and kibana.alert.risk_score >= 73 and kibana.alert.workflow_status == "open" and
60 not kibana.alert.rule.type in ("threat_match", "machine_learning") and
61 not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20", "0")
62
63// group alerts by short time window and extract values of interest for alert triage
64| stats Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
65 Esql.user_name_distinct_count = COUNT_DISTINCT(user.name),
66 Esql.rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
67 Esql.event_category_distinct_count = COUNT_DISTINCT(event.category),
68 Esql.rule_risk_score_distinct_count = COUNT_DISTINCT(kibana.alert.risk_score),
69 Esql.event_module_values = VALUES(event.module),
70 Esql.rule_name_values = VALUES(kibana.alert.rule.name),
71 Esql.message_values = VALUES(message),
72 Esql.event_category_values = VALUES(event.category),
73 Esql.event_action_values = VALUES(event.action),
74 Esql.source_ip_values = VALUES(source.ip),
75 Esql.destination_ip_values = VALUES(destination.ip),
76 Esql.host_id_values = VALUES(host.id),
77 Esql.agent_id_values = VALUES(agent.id),
78 Esql.rule_severity_values = VALUES(kibana.alert.risk_score),
79 Esql.user_name_values = VALUES(user.name) by Esql.time_window_date_trunc
80
81// filter for alerts from different integrations with unique categories
82| where Esql.event_module_distinct_count >= 2 and Esql.user_name_distinct_count >= 2 and Esql.event_category_distinct_count >= 2
83
84// build context for LLM analysis
85| eval users_list = MV_CONCAT(Esql.user_name_values, ",")
86
87// LLM analysis
88| eval instructions = "Analyze the provided user names and return a boolean value true if at least 2 of them are similar and they may belong to the same human identity or false if not, do not compare user names that may look like service accounts. If the list of users has more than 2 users and only 2 of them are similar consider this as true. Structure the output as follows: verdict=<verdict> confidence=<score between 0.0 and 1.0> summary=<short reason max 500 words> without any other response statements on a single line."
89| eval prompt = CONCAT("User identities extracted from different alerts: ", users_list, instructions)
90| COMPLETION triage_result = prompt WITH { "inference_id": ".anthropic-claude-4.6-sonnet-completion"}
91
92// parse LLM response
93| DISSECT triage_result """verdict=%{Esql.verdict} confidence=%{Esql.confidence} summary=%{Esql.summary}"""
94
95// filter for similar user values
96| where TO_LOWER(Esql.verdict) == "true"
97| keep Esql.*
98'''
99note = """## Triage and analysis
100
101> **Disclaimer**:
102> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, analysts should validate findings against their environment and identity architecture.
103
104### Investigating Correlated Alerts on Similar User Identities
105
106This rule identifies alerts from multiple integrations and event categories involving different `user.name` values that may represent the same real-world identity.
107An LLM is used to assess string similarity and naming patterns to determine whether multiple user identifiers likely belong to the same person, which may indicate account compromise, credential abuse, or identity misuse across systems.
108
109### Possible investigation steps
110
111- Review the correlated `user.name` values and validate whether they represent naming variations, aliases, or identity mappings.
112- Examine the LLM output fields (`verdict`, `confidence`, `summary`) as decision support, not ground truth.
113- Analyze the diversity of alert sources, event categories, and detection rules involved.
114- Reconstruct the alert timeline to identify potential stages such as initial access, lateral movement, privilege escalation, or persistence.
115- Correlate with authentication logs, IAM/SSO telemetry, EDR data, and network logs to identify shared sessions, IPs, devices, or hosts.
116- Validate identities against directory services, identity providers, and federation mappings.
117
118### False positive analysis
119
120- Identity format variations across systems (e.g., `first.last`, `flast`, `user@domain`).
121- Federated identity mappings between on-prem, cloud, and SaaS platforms.
122- Service, automation, and CI/CD accounts with similar naming conventions.
123- Separate admin and standard user accounts for the same individual.
124- Shared credentials or naming templates in development and test environments.
125
126### Response and remediation
127
128- Temporarily disable or suspend correlated accounts if compromise is suspected.
129- Revoke active sessions, tokens, and credentials.
130- Investigate access scope, privileges, and lateral movement paths.
131- Perform endpoint and identity forensics to identify persistence mechanisms.
132- Remediate IAM misconfigurations and federation issues.
133- Enhance monitoring for identity correlation, credential misuse, and cross-platform abuse."""
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, analysts should validate findings against their environment and identity architecture.
Investigating Correlated Alerts on Similar User Identities
This rule identifies alerts from multiple integrations and event categories involving different user.name values that may represent the same real-world identity.
An LLM is used to assess string similarity and naming patterns to determine whether multiple user identifiers likely belong to the same person, which may indicate account compromise, credential abuse, or identity misuse across systems.
Possible investigation steps
- Review the correlated
user.namevalues and validate whether they represent naming variations, aliases, or identity mappings. - Examine the LLM output fields (
verdict,confidence,summary) as decision support, not ground truth. - Analyze the diversity of alert sources, event categories, and detection rules involved.
- Reconstruct the alert timeline to identify potential stages such as initial access, lateral movement, privilege escalation, or persistence.
- Correlate with authentication logs, IAM/SSO telemetry, EDR data, and network logs to identify shared sessions, IPs, devices, or hosts.
- Validate identities against directory services, identity providers, and federation mappings.
False positive analysis
- Identity format variations across systems (e.g.,
first.last,flast,user@domain). - Federated identity mappings between on-prem, cloud, and SaaS platforms.
- Service, automation, and CI/CD accounts with similar naming conventions.
- Separate admin and standard user accounts for the same individual.
- Shared credentials or naming templates in development and test environments.
Response and remediation
- Temporarily disable or suspend correlated accounts if compromise is suspected.
- Revoke active sessions, tokens, and credentials.
- Investigate access scope, privileges, and lateral movement paths.
- Perform endpoint and identity forensics to identify persistence mechanisms.
- Remediate IAM misconfigurations and federation issues.
- Enhance monitoring for identity correlation, credential misuse, and cross-platform abuse.
References
Related rules
- LLM-Based Compromised User Triage by User
- LLM-Based Attack Chain Triage by Host
- Okta Alerts Following Unusual Proxy Authentication
- Okta Successful Login After Credential Attack
- LLM-Based Curl Activity Triage