Skip to content

Commit e123016

Browse files
Merge branch 'main' into terrancedejesus/issue5344
2 parents 320d82e + 7fc895e commit e123016

9 files changed

+361
-23
lines changed
530 Bytes
Binary file not shown.
16.2 KB
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "detection_rules"
3-
version = "1.5.13"
3+
version = "1.5.14"
44
description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Security’s Detection Engine."
55
readme = "README.md"
66
requires-python = ">=3.12"
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[metadata]
2+
creation_date = "2025/11/18"
3+
integration = ["endpoint", "panw"]
4+
maturity = "production"
5+
updated_date = "2025/11/18"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This detection correlates Palo Alto Networks (PANW) command and control events with Elastic Defend network events to identify
11+
the source process performing the network activity.
12+
"""
13+
from = "now-9m"
14+
index = ["logs-endpoint.events.network-*", "logs-panw.panos-*"]
15+
language = "eql"
16+
license = "Elastic License v2"
17+
name = "PANW and Elastic Defend - Command and Control Correlation"
18+
references = [
19+
"https://attack.mitre.org/tactics/TA0011/",
20+
"https://www.elastic.co/docs/reference/integrations/panw",
21+
"https://www.elastic.co/docs/reference/integrations/endpoint"
22+
]
23+
risk_score = 47
24+
rule_id = "da4f56b8-9bc5-4003-a46c-d23616fbc691"
25+
severity = "medium"
26+
tags = [
27+
"Domain: Endpoint",
28+
"OS: Linux",
29+
"OS: Windows",
30+
"OS: macOS",
31+
"Use Case: Threat Detection",
32+
"Tactic: Command and Control",
33+
"Data Source: Elastic Defend",
34+
"Data Source: PAN-OS",
35+
"Resources: Investigation Guide",
36+
]
37+
type = "eql"
38+
query = '''
39+
sequence by source.port, source.ip, destination.ip with maxspan=1m
40+
[network where event.module == "panw" and event.action == "c2_communication"]
41+
[network where event.module == "endpoint" and event.action in ("disconnect_received", "connection_attempted")]
42+
'''
43+
note = """## Triage and analysis
44+
45+
### Investigating PANW and Elastic Defend - Command and Control Correlation
46+
47+
### Possible investigation steps
48+
49+
- Investigate in the Timeline feature the two events matching this correlation (PANW and Elastic Defend).
50+
- Review the process details like command_line, privileges, global relevance and reputation.
51+
- Assess the destination.ip reputation and global relevance.
52+
- Review the parent process execution details like command_line, global relevance and reputation.
53+
- Examine all network connection details performed by the process during last 48h.
54+
- Correlate the alert with other security events or logs to identify any patterns or additional indicators of compromise related to the same process or network activity.
55+
56+
### False positive analysis
57+
58+
- Trusted system or third party processes performing network activity that looks like beaconing.
59+
60+
### Response and remediation
61+
62+
- Immediately isolate the affected system from the network to prevent further unauthorized access or data exfiltration.
63+
- Terminate the suspicious processes and all associated children and parents.
64+
- Implement network-level controls to block traffic to the destination.ip.
65+
- Conduct a thorough review of the system's configuration files to identify unauthorized changes.
66+
- Reset credentials for any accounts associated with the source machine.
67+
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
68+
"""
69+
70+
[[rule.threat]]
71+
framework = "MITRE ATT&CK"
72+
73+
[rule.threat.tactic]
74+
id = "TA0011"
75+
name = "Command and Control"
76+
reference = "https://attack.mitre.org/tactics/TA0011/"
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
[metadata]
2+
creation_date = "2025/11/17"
3+
integration = ["endpoint", "fortinet_fortigate"]
4+
maturity = "production"
5+
updated_date = "2025/11/17"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This detection correlates FortiGate's application control SOCKS events with Elastic Defend network event to identify the
11+
source process performing SOCKS traffic. Adversaries may use a connection proxy to direct network traffic between systems
12+
or act as an intermediary for network communications to a command and control server to avoid direct connections to their
13+
infrastructure.
14+
"""
15+
from = "now-9m"
16+
index = ["logs-endpoint.events.network-*", "logs-fortinet_fortigate.log-*"]
17+
language = "eql"
18+
license = "Elastic License v2"
19+
name = "SOCKS Traffic from an Unusual Process"
20+
references = [
21+
"https://attack.mitre.org/techniques/T1090/",
22+
"https://www.elastic.co/docs/reference/integrations/fortinet_fortigate",
23+
"https://www.elastic.co/docs/reference/integrations/endpoint"
24+
]
25+
risk_score = 47
26+
rule_id = "6926b708-7964-425f-bed8-6e006379df08"
27+
severity = "medium"
28+
tags = [
29+
"Domain: Endpoint",
30+
"OS: Linux",
31+
"OS: Windows",
32+
"OS: macOS",
33+
"Use Case: Threat Detection",
34+
"Tactic: Command and Control",
35+
"Data Source: Elastic Defend",
36+
"Data Source: Fortinet",
37+
"Resources: Investigation Guide",
38+
]
39+
type = "eql"
40+
query = '''
41+
sequence by source.port, source.ip, destination.ip with maxspan=1m
42+
[network where event.dataset == "fortinet_fortigate.log" and event.action == "signature" and network.application in ("SOCKS4", "SOCKS5")]
43+
[network where event.module == "endpoint" and event.action in ("disconnect_received", "connection_attempted")]
44+
'''
45+
note = """## Triage and analysis
46+
47+
### Investigating SOCKS Traffic from an Unusual Process
48+
49+
### Possible investigation steps
50+
51+
- Review the process details like command_line, privileges, global relevance and reputation.
52+
- Review the parent process execution details like command_line, global relevance and reputation.
53+
- Examine all network connection details performed by the process during last 48h.
54+
- Examine all localhost network connections performed by the same process to verify if there is any port forwarding with another process on the same machine.
55+
- Correlate the alert with other security events or logs to identify any patterns or additional indicators of compromise related to the same process or network activity.
56+
57+
### False positive analysis
58+
59+
- Browser proxy extensions and Add-ons.
60+
- Development and deployment tools.
61+
- Third party trusted tools using SOCKS for network communication.
62+
63+
### Response and remediation
64+
65+
- Immediately isolate the affected system from the network to prevent further unauthorized access or data exfiltration.
66+
- Terminate the suspicious processes and all associated children and parents.
67+
- Conduct a thorough review of the system's configuration files to identify unauthorized changes.
68+
- Reset credentials for any accounts associated with the source machine.
69+
- Implement network-level controls to block traffic via SOCKS unless authorized.
70+
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
71+
"""
72+
73+
[[rule.threat]]
74+
framework = "MITRE ATT&CK"
75+
76+
[[rule.threat.technique]]
77+
id = "T1090"
78+
name = "Proxy"
79+
reference = "https://attack.mitre.org/techniques/T1090/"
80+
81+
82+
[rule.threat.tactic]
83+
id = "TA0011"
84+
name = "Command and Control"
85+
reference = "https://attack.mitre.org/tactics/TA0011/"

rules/cross-platform/defense_evasion_agent_spoofing_multiple_hosts.toml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[metadata]
22
creation_date = "2021/07/14"
3+
integration = ["endpoint"]
34
maturity = "production"
4-
updated_date = "2025/01/15"
5+
updated_date = "2025/11/13"
56

67
[rule]
78
author = ["Elastic"]
@@ -17,19 +18,22 @@ false_positives = [
1718
""",
1819
]
1920
from = "now-9m"
20-
index = ["logs-*", "metrics-*", "traces-*"]
21-
language = "kuery"
21+
language = "esql"
2222
license = "Elastic License v2"
2323
name = "Agent Spoofing - Multiple Hosts Using Same Agent"
2424
risk_score = 73
2525
rule_id = "493834ca-f861-414c-8602-150d5505b777"
2626
severity = "high"
2727
tags = ["Use Case: Threat Detection", "Tactic: Defense Evasion", "Resources: Investigation Guide"]
2828
timestamp_override = "event.ingested"
29-
type = "threshold"
29+
type = "esql"
3030

3131
query = '''
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
'''
3438
note = """## Triage and analysis
3539
@@ -80,11 +84,4 @@ id = "TA0005"
8084
name = "Defense Evasion"
8185
reference = "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

rules/integrations/aws/defense_evasion_elasticache_security_group_creation.toml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
creation_date = "2021/07/19"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/11/18"
66

77
[rule]
88
author = ["Austin Songer"]
9-
description = "Identifies when an ElastiCache security group has been created."
9+
description = """
10+
Identifies when an ElastiCache security group has been created. Amazon EC2-Classic and ElastiCache CacheSecurityGroups
11+
have been retired. Modern ElastiCache deployments run in a VPC and use standard EC2 security groups instead. This rule
12+
should be retained only for historical log analysis on legacy CloudTrail data. We recommend relying on "AWS EC2 Security
13+
Group Configuration Change" rule for network-control changes impacting ElastiCache in VPC-based deployments.
14+
"""
1015
false_positives = [
1116
"""
1217
A ElastiCache security group may be created by a system or network administrator. Verify whether the user identity,
@@ -20,13 +25,13 @@ index = ["filebeat-*", "logs-aws.cloudtrail-*"]
2025
interval = "10m"
2126
language = "kuery"
2227
license = "Elastic License v2"
23-
name = "AWS ElastiCache Security Group Created"
28+
name = "Deprecated - AWS ElastiCache Security Group Created"
2429
note = """## Triage and analysis
2530
2631
> **Disclaimer**:
2732
> 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.
2833
29-
### Investigating AWS ElastiCache Security Group Created
34+
### Investigating Deprecated - AWS ElastiCache Security Group Created
3035
3136
AWS ElastiCache security groups control access to cache clusters, ensuring only authorized traffic can interact with them. Adversaries might create new security groups to bypass existing restrictions, facilitating unauthorized access or data exfiltration. The detection rule monitors for successful creation events of these groups, signaling potential defense evasion tactics by identifying unusual or unauthorized configurations.
3237
@@ -66,7 +71,13 @@ references = [
6671
risk_score = 21
6772
rule_id = "7b3da11a-60a2-412e-8aa7-011e1eb9ed47"
6873
severity = "low"
69-
tags = ["Domain: Cloud", "Data Source: AWS", "Data Source: Amazon Web Services", "Tactic: Defense Evasion", "Resources: Investigation Guide"]
74+
tags = [
75+
"Domain: Cloud",
76+
"Data Source: AWS",
77+
"Data Source: Amazon Web Services",
78+
"Tactic: Defense Evasion",
79+
"Resources: Investigation Guide",
80+
]
7081
timestamp_override = "event.ingested"
7182
type = "query"
7283

rules/integrations/aws/defense_evasion_elasticache_security_group_modified_or_deleted.toml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
creation_date = "2021/07/19"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/11/18"
66

77
[rule]
88
author = ["Austin Songer"]
9-
description = "Identifies when an ElastiCache security group has been modified or deleted."
9+
description = """
10+
Identifies when an ElastiCache security group has been modified or deleted. Amazon EC2-Classic and ElastiCache
11+
CacheSecurityGroups have been retired. Modern ElastiCache deployments run in a VPC and use standard EC2 security groups
12+
instead. This rule should be retained only for historical log analysis on legacy CloudTrail data. We recommend relying
13+
on "AWS EC2 Security Group Configuration Change" rule for network-control changes impacting ElastiCache in VPC-based
14+
deployments.
15+
"""
1016
false_positives = [
1117
"""
1218
A ElastiCache security group deletion may be done by a system or network administrator. Verify whether the user
@@ -20,13 +26,13 @@ index = ["filebeat-*", "logs-aws.cloudtrail-*"]
2026
interval = "10m"
2127
language = "kuery"
2228
license = "Elastic License v2"
23-
name = "AWS ElastiCache Security Group Modified or Deleted"
29+
name = "Deprecated - AWS ElastiCache Security Group Modified or Deleted"
2430
note = """## Triage and analysis
2531
2632
> **Disclaimer**:
2733
> 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.
2834
29-
### Investigating AWS ElastiCache Security Group Modified or Deleted
35+
### Investigating Deprecated - AWS ElastiCache Security Group Modified or Deleted
3036
3137
AWS ElastiCache security groups control inbound and outbound traffic to cache clusters, ensuring only authorized access. Adversaries may modify or delete these groups to bypass security controls, facilitating unauthorized data access or exfiltration. The detection rule monitors specific API actions related to security group changes, flagging successful modifications or deletions as potential defense evasion attempts.
3238
@@ -64,7 +70,13 @@ references = ["https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference
6470
risk_score = 21
6571
rule_id = "1ba5160d-f5a2-4624-b0ff-6a1dc55d2516"
6672
severity = "low"
67-
tags = ["Domain: Cloud", "Data Source: AWS", "Data Source: Amazon Web Services", "Tactic: Defense Evasion", "Resources: Investigation Guide"]
73+
tags = [
74+
"Domain: Cloud",
75+
"Data Source: AWS",
76+
"Data Source: Amazon Web Services",
77+
"Tactic: Defense Evasion",
78+
"Resources: Investigation Guide",
79+
]
6880
timestamp_override = "event.ingested"
6981
type = "query"
7082

0 commit comments

Comments
 (0)