Alerts in Different ATT&CK Tactics by Host
This rule uses alert data to determine when multiple alerts in different phases of an attack involving the same host are triggered and where the accumulated risk score is higher than a defined threshold. Analysts can use this to prioritize triage and response, as these hosts are more likely to be compromised.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/11/19"
3maturity = "production"
4updated_date = "2025/11/19"
5
6[rule]
7author = ["Elastic"]
8description = """
9This rule uses alert data to determine when multiple alerts in different phases of an attack involving the same host are
10triggered and where the accumulated risk score is higher than a defined threshold. Analysts can use this to prioritize
11triage and response, as these hosts are more likely to be compromised.
12"""
13from = "now-8h"
14interval = "1h"
15language = "esql"
16license = "Elastic License v2"
17name = "Alerts in Different ATT&CK Tactics by Host"
18risk_score = 73
19rule_id = "29531d20-0e80-41d4-9ec6-d6b58e4a475c"
20severity = "high"
21tags = ["Use Case: Threat Detection", "Rule Type: Higher-Order Rule", "Resources: Investigation Guide"]
22timestamp_override = "event.ingested"
23type = "esql"
24
25query = '''
26from .alerts-security.* metadata _id
27
28// filter for alerts with populated risk score, excluding threat_match rules, deprecated and some other noisy ones.
29| where kibana.alert.risk_score > 0 and
30 kibana.alert.rule.name IS NOT NULL and
31 host.id is not null and event.dataset is not null and
32 kibana.alert.rule.type != "threat_match" and
33 not kibana.alert.rule.name in ("Agent Spoofing - Mismatched Agent ID") and
34 not kibana.alert.rule.name like "Deprecated - *"
35
36// extract unique counts and values by host.id
37| stats Esql.alerts_count = COUNT(*),
38 Esql.kibana_alert_rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
39 Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
40 Esql.event_module_values = VALUES(event.module),
41 Esql.kibana_alert_rule_name_values = VALUES(kibana.alert.rule.name),
42 Esql.threat_tactic_id_distinct_count = COUNT_DISTINCT(kibana.alert.rule.threat.tactic.id),
43 Esql.threat_tactic_name_values = VALUES(kibana.alert.rule.threat.tactic.name),
44 Esql.kibana_alert_risk_score_sum = sum(kibana.alert.risk_score),
45 Esql.process_executable_values = VALUES(process.executable),
46 Esql.process_parent_executable_values = VALUES(process.parent.executable),
47 Esql.process_command_line_values = VALUES(process.command_line),
48 Esql.process_entity_id_distinct_count = COUNT_DISTINCT(process.entity_id) by host.id
49
50// divide the sum of risk scores by the total number of alerts
51| eval Esql.risk_alerts_count_ratio = Esql.kibana_alert_risk_score_sum/Esql.alerts_count
52
53// filter for risky hosts by risk score and unique count of rules and tactics
54| where Esql.kibana_alert_rule_name_distinct_count >= 5 and Esql.threat_tactic_id_distinct_count >= 3 and Esql.threat_tactic_id_distinct_count >= 3 and Esql.alerts_count <= 500 and Esql.risk_alerts_count_ratio >= 50
55
56// fiels populated in the resulting alert
57| keep host.id,
58 Esql.alerts_count,
59 Esql.kibana_alert_risk_score_sum,
60 Esql.risk_alerts_count_ratio,
61 Esql.kibana_alert_rule_name_distinct_count,
62 Esql.event_module_values,
63 Esql.kibana_alert_rule_name_values,
64 Esql.threat_tactic_name_values,
65 Esql.process_executable_values,
66 Esql.process_parent_executable_values,
67 Esql.process_command_line_values
68'''
69note = """## Triage and analysis
70
71> **Disclaimer**:
72> 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, we recommend validating the content and adapting it to suit your specific environment and operational needs.
73
74### Investigating Alerts in Different ATT&CK Tactics by Host
75
76The detection rule identifies hosts with alerts across various attack phases, indicating potential compromise. Adversaries exploit system vulnerabilities, moving through different tactics like execution, persistence, and exfiltration. This rule prioritizes hosts with diverse tactic alerts, aiding analysts in focusing on high-risk threats by correlating alert data to detect complex attack patterns.
77
78### Possible investigation steps
79
80- Review the alert details to identify the specific host involved and the different ATT&CK tactics that triggered the alerts.
81- Examine the timeline of the alerts to understand the sequence of events and determine if there is a pattern or progression in the tactics used.
82- Correlate the alert data with other logs and telemetry from the host, such as process creation, network connections, and file modifications, to gather additional context.
83- Investigate any known vulnerabilities or misconfigurations on the host that could have been exploited by the adversary.
84- Check for any indicators of compromise (IOCs) associated with the alerts, such as suspicious IP addresses, domains, or file hashes, and search for these across the network.
85- Assess the impact and scope of the potential compromise by determining if other hosts or systems have similar alerts or related activity.
86
87### False positive analysis
88
89- Alerts from routine administrative tasks may trigger multiple tactics. Review and exclude known benign activities such as scheduled software updates or system maintenance.
90- Security tools running on the host might generate alerts across different tactics. Identify and exclude alerts from trusted security applications to reduce noise.
91- Automated scripts or batch processes can mimic adversarial behavior. Analyze and whitelist these processes if they are verified as non-threatening.
92- Frequent alerts from development or testing environments can be misleading. Consider excluding these environments from the rule or applying a different risk score.
93- User behavior anomalies, such as accessing multiple systems or applications, might trigger alerts. Implement user behavior baselines to differentiate between normal and suspicious activities.
94
95### Response and remediation
96
97- Isolate the affected host from the network immediately to prevent further lateral movement by the adversary.
98- Conduct a thorough forensic analysis of the host to identify the specific vulnerabilities exploited and gather evidence of the attack phases involved.
99- Remove any identified malicious software or unauthorized access tools from the host, ensuring all persistence mechanisms are eradicated.
100- Apply security patches and updates to the host to address any exploited vulnerabilities and prevent similar attacks.
101- Restore the host from a known good backup if necessary, ensuring that the backup is free from compromise.
102- Monitor the host and network for any signs of re-infection or further suspicious activity, using enhanced logging and alerting based on the identified attack patterns.
103- Escalate the incident to the appropriate internal or external cybersecurity teams for further investigation and potential legal action if the attack is part of a larger campaign."""
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, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating Alerts in Different ATT&CK Tactics by Host
The detection rule identifies hosts with alerts across various attack phases, indicating potential compromise. Adversaries exploit system vulnerabilities, moving through different tactics like execution, persistence, and exfiltration. This rule prioritizes hosts with diverse tactic alerts, aiding analysts in focusing on high-risk threats by correlating alert data to detect complex attack patterns.
Possible investigation steps
- Review the alert details to identify the specific host involved and the different ATT&CK tactics that triggered the alerts.
- Examine the timeline of the alerts to understand the sequence of events and determine if there is a pattern or progression in the tactics used.
- Correlate the alert data with other logs and telemetry from the host, such as process creation, network connections, and file modifications, to gather additional context.
- Investigate any known vulnerabilities or misconfigurations on the host that could have been exploited by the adversary.
- Check for any indicators of compromise (IOCs) associated with the alerts, such as suspicious IP addresses, domains, or file hashes, and search for these across the network.
- Assess the impact and scope of the potential compromise by determining if other hosts or systems have similar alerts or related activity.
False positive analysis
- Alerts from routine administrative tasks may trigger multiple tactics. Review and exclude known benign activities such as scheduled software updates or system maintenance.
- Security tools running on the host might generate alerts across different tactics. Identify and exclude alerts from trusted security applications to reduce noise.
- Automated scripts or batch processes can mimic adversarial behavior. Analyze and whitelist these processes if they are verified as non-threatening.
- Frequent alerts from development or testing environments can be misleading. Consider excluding these environments from the rule or applying a different risk score.
- User behavior anomalies, such as accessing multiple systems or applications, might trigger alerts. Implement user behavior baselines to differentiate between normal and suspicious activities.
Response and remediation
- Isolate the affected host from the network immediately to prevent further lateral movement by the adversary.
- Conduct a thorough forensic analysis of the host to identify the specific vulnerabilities exploited and gather evidence of the attack phases involved.
- Remove any identified malicious software or unauthorized access tools from the host, ensuring all persistence mechanisms are eradicated.
- Apply security patches and updates to the host to address any exploited vulnerabilities and prevent similar attacks.
- Restore the host from a known good backup if necessary, ensuring that the backup is free from compromise.
- Monitor the host and network for any signs of re-infection or further suspicious activity, using enhanced logging and alerting based on the identified attack patterns.
- Escalate the incident to the appropriate internal or external cybersecurity teams for further investigation and potential legal action if the attack is part of a larger campaign.
Related rules
- Multiple Elastic Defend Alerts by Agent
- Elastic Defend and Email Alerts Correlation
- Elastic Defend and Network Security Alerts Correlation
- Potential Malicious PowerShell Based on Alert Correlation
- Potential Widespread Malware Infection Across Multiple Hosts