Skip to content

Commit 6402148

Browse files
authored
Merge branch 'main' into rule-tuning-windows-process-termination-followed-by-deletion
2 parents 9f853a2 + 2b6116e commit 6402148

File tree

38 files changed

+292
-149
lines changed

38 files changed

+292
-149
lines changed
730 Bytes
Binary file not shown.
202 KB
Binary file not shown.

detection_rules/schemas/definitions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def validator(value):
7979
'sentinel_one_cloud_funnel',
8080
'ti_rapid7_threat_command',
8181
'm365_defender',
82-
'panw']
82+
'panw',
83+
'crowdstrike']
8384
NON_PUBLIC_FIELDS = {
8485
"related_integrations": (Version.parse('8.3.0'), None),
8586
"required_fields": (Version.parse('8.3.0'), None),

lib/kibana/kibana/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .connector import Kibana
99
from .resources import RuleResource, Signal
1010

11-
__version__ = '0.2.1'
11+
__version__ = '0.4.1'
1212
__all__ = (
1313
"Kibana",
1414
"RuleResource",

lib/kibana/kibana/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def current(cls) -> 'Kibana':
242242
def verify_space(self, space):
243243
"""Verify a space is valid."""
244244
spaces = self.get('/api/spaces/space')
245-
space_names = [s['name'] for s in spaces]
245+
space_names = [s['id'] for s in spaces]
246246
if space not in space_names:
247247
raise ValueError(f'Unknown Kibana space: {space}')
248248

lib/kibana/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-kibana"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
description = "Kibana API utilities for Elastic Detection Rules"
55
license = {text = "Elastic License v2"}
66
keywords = ["Elastic", "Kibana", "Detection Rules", "Security", "Elasticsearch"]
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
[metadata]
2+
creation_date = "2024/10/23"
3+
integration = ["aws"]
4+
maturity = "production"
5+
updated_date = "2024/10/23"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
Identifies role chaining activity. Role chaining is when you use one assumed role to assume a second role through the AWS CLI or API.
11+
While this a recognized functionality in AWS, role chaining can be abused for privilege escalation if the subsequent assumed role provides additional privileges.
12+
Role chaining can also be used as a persistence mechanism as each AssumeRole action results in a refreshed session token with a 1 hour maximum duration.
13+
This rule looks for role chaining activity happening within a single account, to eliminate false positives produced by common cross-account behavior.
14+
"""
15+
false_positives = [
16+
"""
17+
Role chaining can be used as an access control. Ensure that this behavior is not part of a legitimate operation before taking action.
18+
""",
19+
]
20+
from = "now-6m"
21+
language = "esql"
22+
license = "Elastic License v2"
23+
name = "AWS STS Role Chaining"
24+
note = """## Setup
25+
26+
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
27+
references = [
28+
"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts",
29+
"https://www.uptycs.com/blog/detecting-anomalous-aws-sessions-temporary-credentials",
30+
"https://hackingthe.cloud/aws/post_exploitation/role-chain-juggling/",
31+
]
32+
risk_score = 47
33+
rule_id = "ba5a0b0c-b477-4729-a3dc-0147c2049cf1"
34+
severity = "medium"
35+
tags = [
36+
"Domain: Cloud",
37+
"Data Source: AWS",
38+
"Data Source: Amazon Web Services",
39+
"Data Source: AWS STS",
40+
"Use Case: Threat Detection",
41+
"Tactic: Persistence",
42+
"Tactic: Privilege Escalation",
43+
"Tactic: Lateral Movement",
44+
]
45+
timestamp_override = "event.ingested"
46+
type = "esql"
47+
48+
query = '''
49+
from logs-aws.cloudtrail-* metadata _id, _version, _index
50+
51+
// filter for AssumeRole API calls where access key id is a short term token beginning with ASIA
52+
| where event.dataset == "aws.cloudtrail" and event.provider == "sts.amazonaws.com" and event.action == "AssumeRole" and aws.cloudtrail.resources.account_id == aws.cloudtrail.recipient_account_id and aws.cloudtrail.user_identity.access_key_id like "ASIA*"
53+
54+
// keep only the relevant fields
55+
| keep aws.cloudtrail.user_identity.arn, cloud.region, aws.cloudtrail.resources.account_id, aws.cloudtrail.recipient_account_id, aws.cloudtrail.user_identity.access_key_id
56+
'''
57+
58+
59+
[[rule.threat]]
60+
framework = "MITRE ATT&CK"
61+
[[rule.threat.technique]]
62+
id = "T1548"
63+
name = "Abuse Elevation Control Mechanism"
64+
reference = "https://attack.mitre.org/techniques/T1548/"
65+
66+
67+
[rule.threat.tactic]
68+
id = "TA0004"
69+
name = "Privilege Escalation"
70+
reference = "https://attack.mitre.org/tactics/TA0004/"
71+
[[rule.threat]]
72+
framework = "MITRE ATT&CK"
73+
[[rule.threat.technique]]
74+
id = "T1550"
75+
name = "Use Alternate Authentication Material"
76+
reference = "https://attack.mitre.org/techniques/T1550/"
77+
[[rule.threat.technique.subtechnique]]
78+
id = "T1550.001"
79+
name = "Application Access Token"
80+
reference = "https://attack.mitre.org/techniques/T1550/001/"
81+
82+
83+
[rule.threat.tactic]
84+
id = "TA0008"
85+
name = "Lateral Movement"
86+
reference = "https://attack.mitre.org/tactics/TA0008/"
87+
[[rule.threat]]
88+
framework = "MITRE ATT&CK"
89+
90+
[rule.threat.tactic]
91+
id = "TA0003"
92+
name = "Persistence"
93+
reference = "https://attack.mitre.org/tactics/TA0003/"

rules/windows/collection_email_powershell_exchange_mailbox.toml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
creation_date = "2020/12/15"
3-
integration = ["endpoint", "windows", "system", "sentinel_one_cloud_funnel", "m365_defender"]
3+
integration = ["endpoint", "windows", "system", "sentinel_one_cloud_funnel", "m365_defender", "crowdstrike"]
44
maturity = "production"
55
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
66
min_stack_version = "8.14.0"
7-
updated_date = "2024/10/15"
7+
updated_date = "2024/10/31"
88

99
[rule]
1010
author = ["Elastic"]
@@ -22,6 +22,7 @@ index = [
2222
"logs-system.security*",
2323
"logs-sentinel_one_cloud_funnel.*",
2424
"logs-m365_defender.event-*",
25+
"logs-crowdstrike.fdr*",
2526
]
2627
language = "eql"
2728
license = "Elastic License v2"
@@ -74,14 +75,6 @@ references = [
7475
]
7576
risk_score = 47
7677
rule_id = "6aace640-e631-4870-ba8e-5fdda09325db"
77-
setup = """## Setup
78-
79-
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
80-
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
81-
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
82-
`event.ingested` to @timestamp.
83-
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
84-
"""
8578
severity = "medium"
8679
tags = [
8780
"Domain: Endpoint",
@@ -95,6 +88,7 @@ tags = [
9588
"Data Source: SentinelOne",
9689
"Data Source: Microsoft Defender for Endpoint",
9790
"Data Source: System",
91+
"Data Source: Crowdstrike",
9892
]
9993
timestamp_override = "event.ingested"
10094
type = "eql"

rules/windows/command_and_control_headless_browser.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2024/05/10"
3-
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
3+
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2024/10/15"
5+
updated_date = "2024/10/31"
66
min_stack_version = "8.14.0"
77
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
88

@@ -22,6 +22,7 @@ index = [
2222
"logs-system.security*",
2323
"logs-m365_defender.event-*",
2424
"logs-sentinel_one_cloud_funnel.*",
25+
"logs-crowdstrike.fdr*",
2526
]
2627
language = "eql"
2728
license = "Elastic License v2"
@@ -67,6 +68,7 @@ tags = [
6768
"Data Source: Microsoft Defender for Endpoint",
6869
"Data Source: SentinelOne",
6970
"Data Source: Sysmon",
71+
"Data Source: Crowdstrike",
7072
]
7173
timestamp_override = "event.ingested"
7274
type = "eql"

rules/windows/command_and_control_rdp_tunnel_plink.toml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
creation_date = "2020/10/14"
3-
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system", "crowdstrike"]
44
maturity = "production"
55
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
66
min_stack_version = "8.14.0"
7-
updated_date = "2024/10/17"
7+
updated_date = "2024/10/31"
88

99
[rule]
1010
author = ["Elastic"]
@@ -13,7 +13,7 @@ Identifies potential use of an SSH utility to establish RDP over a reverse SSH T
1313
enable routing of network packets that would otherwise not reach their intended destination.
1414
"""
1515
from = "now-9m"
16-
index = ["logs-endpoint.events.process-*", "winlogbeat-*", "logs-windows.*", "endgame-*", "logs-system.security*", "logs-sentinel_one_cloud_funnel.*", "logs-m365_defender.event-*"]
16+
index = ["logs-endpoint.events.process-*", "winlogbeat-*", "logs-windows.*", "endgame-*", "logs-system.security*", "logs-sentinel_one_cloud_funnel.*", "logs-m365_defender.event-*", "logs-crowdstrike.fdr*"]
1717
language = "eql"
1818
license = "Elastic License v2"
1919
name = "Potential Remote Desktop Tunneling Detected"
@@ -54,14 +54,6 @@ This rule looks for command lines involving the `3389` port, which RDP uses by d
5454
references = ["https://blog.netspi.com/how-to-access-rdp-over-a-reverse-ssh-tunnel/"]
5555
risk_score = 73
5656
rule_id = "76fd43b7-3480-4dd9-8ad7-8bd36bfad92f"
57-
setup = """## Setup
58-
59-
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
60-
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
61-
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
62-
`event.ingested` to @timestamp.
63-
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
64-
"""
6557
severity = "high"
6658
tags = [
6759
"Domain: Endpoint",
@@ -75,6 +67,7 @@ tags = [
7567
"Data Source: SentinelOne",
7668
"Data Source: Microsoft Defender for Endpoint",
7769
"Data Source: System",
70+
"Data Source: Crowdstrike",
7871
]
7972
timestamp_override = "event.ingested"
8073
type = "eql"

0 commit comments

Comments
 (0)