Skip to content

Commit b84fc6c

Browse files
authored
Merge branch 'main' into multi-by-ds
2 parents a9537a8 + 25545b5 commit b84fc6c

File tree

38 files changed

+792
-297
lines changed

38 files changed

+792
-297
lines changed

detection_rules/etc/non-ecs-schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150
"kibana.alert.rule.type": "keyword",
151151
"kibana.alert.rule.threat.tactic.name": "keyword"
152152
},
153+
"logs-github.audit-*": {
154+
"github.reasons.code": "keyword",
155+
"github.reasons.message": "text"
156+
},
153157
"logs-google_workspace*": {
154158
"gsuite.admin": "keyword",
155159
"gsuite.admin.new_value": "keyword",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ For a production-ready and more integrated solution that is designed to work wit
4949
* [Sysmon Event IDs 17, 18: Named Pipe Events](sysmon_eventid17_18_pipe_event.md)
5050
* [Sysmon Event IDs 19, 20, 21: WMI Events](sysmon_eventid19_20_21_wmi_event.md)
5151
* [Sysmon Event ID 22: DNS Query](sysmon_eventid22_dns_query.md)
52-
* [Sysmon Event ID 23: File Delete](sysmon_eventid23_file_delete.md)
52+
* [Sysmon Event ID 23: File Delete](sysmon_eventid23_file_delete.md)

docs/docset.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cross_links:
33
- docs-content
44
exclude:
55
- '_*.md'
6-
- 'README.md'
6+
- 'readme.md'
77

88
extensions:
99
- detection-rules
@@ -13,7 +13,7 @@ toc:
1313
detection_rules: ['../rules', '../rules_building_block']
1414
- folder: audit_policies/windows
1515
children:
16-
- file: README.md
16+
- file: readme.md
1717
- file: audit_authorization_policy_change.md
1818
- file: audit_computer_account_management.md
1919
- file: audit_detailed_file_share.md

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.23"
3+
version = "1.5.24"
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"

rules/cross-platform/persistence_shell_profile_modification.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -14,7 +14,7 @@ triggered by a user’s shell.
1414
"""
1515
false_positives = ["Changes to the Shell Profile tend to be noisy, a tuning per your environment will be required."]
1616
from = "now-9m"
17-
index = ["logs-endpoint.events.*", "auditbeat-*"]
17+
index = ["logs-endpoint.events.file-*", "auditbeat-*"]
1818
language = "kuery"
1919
license = "Elastic License v2"
2020
name = "Bash Shell Profile Modification"
@@ -35,20 +35,12 @@ timestamp_override = "event.ingested"
3535
type = "query"
3636

3737
query = '''
38-
event.category:file and event.type:change and
38+
event.category:file and host.os.type:(linux or macos) and event.type:change and not event.action:("rename" or "extended_attributes_delete") and
39+
file.name:(".bash_profile" or ".profile" or ".bashrc" or ".zshenv" or ".zshrc") and file.path:(/home/* or /Users/*) and
3940
process.name:(* and not (sudo or vim or zsh or env or nano or bash or Terminal or xpcproxy or login or cat or cp or
4041
launchctl or java or dnf or tailwatchd or ldconfig or yum or semodule or cpanellogd or dockerd or authselect or chmod or
4142
dnf-automatic or git or dpkg or platform-python)) and
42-
not process.executable:(/Applications/* or /private/var/folders/* or /usr/local/* or /opt/saltstack/salt/bin/*) and
43-
file.path:(/private/etc/rc.local or
44-
/etc/rc.local or
45-
/home/*/.profile or
46-
/home/*/.profile1 or
47-
/home/*/.bash_profile or
48-
/home/*/.bash_profile1 or
49-
/home/*/.bashrc or
50-
/Users/*/.bash_profile or
51-
/Users/*/.zshenv)
43+
not process.executable:(/Applications/* or /private/var/folders/* or /usr/local/* or /opt/saltstack/salt/bin/*)
5244
'''
5345
note = """## Triage and analysis
5446

rules/integrations/aws/collection_s3_unauthenticated_bucket_access_by_rare_source.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/12/17"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/09/08"
5+
updated_date = "2025/12/16"
66

77
[rule]
88
author = ["Elastic"]
@@ -181,6 +181,6 @@ field = "new_terms_fields"
181181
value = ["source.address", "tls.client.server_name"]
182182
[[rule.new_terms.history_window_start]]
183183
field = "history_window_start"
184-
value = "now-7d"
184+
value = "now-5d"
185185

186186

rules/integrations/aws/credential_access_new_terms_secretsmanager_getsecretvalue.toml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
creation_date = "2020/07/06"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/12/12"
5+
updated_date = "2025/12/16"
66

77
[rule]
88
author = ["Nick Jones", "Elastic"]
99
description = """
1010
An adversary with access to a compromised AWS service such as an EC2 instance, Lambda function, or other service may
1111
attempt to leverage the compromised service to access secrets in AWS Secrets Manager. This rule looks for the first time
12-
a specific user identity has programmatically retrieved a secret value from Secrets Manager using the `GetSecretValue`
13-
or `BatchGetSecretValue` actions. This rule assumes that AWS services such as Lambda functions and EC2 instances are
14-
setup with IAM role's assigned that have the necessary permissions to access the secrets in Secrets Manager. An
15-
adversary with access to a compromised AWS service would rely on its' attached role to access the secrets in Secrets Manager.
12+
a specific user identity has programmatically retrieved a secret value from Secrets Manager using the GetSecretValue
13+
action. This rule assumes that AWS services such as Lambda functions and EC2 instances are setup with IAM role's
14+
assigned that have the necessary permissions to access the secrets in Secrets Manager. An adversary with access to a
15+
compromised AWS service would rely on its' attached role to access the secrets in Secrets Manager.
1616
"""
1717
false_positives = [
1818
"""
@@ -22,7 +22,6 @@ false_positives = [
2222
]
2323
from = "now-6m"
2424
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
25-
interval = "5m"
2625
language = "kuery"
2726
license = "Elastic License v2"
2827
name = "First Time Seen AWS Secret Value Accessed in Secrets Manager"
@@ -32,7 +31,7 @@ note = """## Triage and analysis
3231
3332
AWS Secrets Manager is a service that enables the replacement of hardcoded credentials in code, including passwords, with an API call to Secrets Manager to retrieve the secret programmatically.
3433
35-
This rule looks for the retrieval of credentials from Secrets Manager using `GetSecretValue` or `BatchGetSecretValue` API calls. This is a [New Terms](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-new-terms-rule) rule indicating this is the first time a specific user identity has successfuly retrieved a secret value from Secrets Manager.
34+
This rule looks for the retrieval of credentials from Secrets Manager using `GetSecretValue` API calls. This is a [New Terms](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-new-terms-rule) rule indicating this is the first time a specific user identity has successfuly retrieved a secret value from Secrets Manager.
3635
3736
#### Possible investigation steps
3837
@@ -95,26 +94,12 @@ timestamp_override = "event.ingested"
9594
type = "new_terms"
9695

9796
query = '''
98-
event.dataset:aws.cloudtrail and event.provider:secretsmanager.amazonaws.com and
99-
event.action: (GetSecretValue or BatchGetSecretValue) and event.outcome:success and
100-
not user_agent.name: ("Chrome" or "Firefox" or "Safari" or "Edge" or "Brave" or "Opera" or "Boto3")
97+
event.dataset: aws.cloudtrail
98+
and event.provider: secretsmanager.amazonaws.com
99+
and event.action: GetSecretValue
100+
and event.outcome: success
101101
'''
102102

103-
[rule.investigation_fields]
104-
field_names = [
105-
"@timestamp",
106-
"user.name",
107-
"user_agent.original",
108-
"source.ip",
109-
"aws.cloudtrail.user_identity.arn",
110-
"aws.cloudtrail.user_identity.type",
111-
"aws.cloudtrail.user_identity.access_key_id",
112-
"event.action",
113-
"event.outcome",
114-
"cloud.account.id",
115-
"cloud.region",
116-
"aws.cloudtrail.request_parameters"
117-
]
118103

119104
[[rule.threat]]
120105
framework = "MITRE ATT&CK"
@@ -134,11 +119,27 @@ id = "TA0006"
134119
name = "Credential Access"
135120
reference = "https://attack.mitre.org/tactics/TA0006/"
136121

122+
[rule.investigation_fields]
123+
field_names = [
124+
"@timestamp",
125+
"user.name",
126+
"user_agent.original",
127+
"source.ip",
128+
"aws.cloudtrail.user_identity.arn",
129+
"aws.cloudtrail.user_identity.type",
130+
"aws.cloudtrail.user_identity.access_key_id",
131+
"event.action",
132+
"event.outcome",
133+
"cloud.account.id",
134+
"cloud.region",
135+
"aws.cloudtrail.request_parameters",
136+
]
137+
137138
[rule.new_terms]
138139
field = "new_terms_fields"
139140
value = ["cloud.account.id", "user.name"]
140141
[[rule.new_terms.history_window_start]]
141142
field = "history_window_start"
142-
value = "now-10d"
143+
value = "now-5d"
143144

144145

rules/integrations/aws/credential_access_retrieve_secure_string_parameters_via_ssm.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/04/12"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/07/09"
5+
updated_date = "2025/12/16"
66

77
[rule]
88
author = ["Elastic"]
@@ -125,4 +125,4 @@ field = "new_terms_fields"
125125
value = ["cloud.account.id", "user.name"]
126126
[[rule.new_terms.history_window_start]]
127127
field = "history_window_start"
128-
value = "now-10d"
128+
value = "now-5d"

0 commit comments

Comments
 (0)