You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Rule Tuning] First Time Seen AWS Secret Value Accessed in Secrets Manager (#4992)
This rule is evaluating the "new terms" against every individual role session, rather than against the Role itself. This is causing a massive volume of alerts
- updated rule description and investigation guide
- reduced execution window and interval
- replaced new terms from `user.id` to combination of `cloud.account.id` and `user.name` to account for evaluation against Roles and in the event that separate AWS accounts under the same Org reuse IAM user names. This will only evaluate the Role instead of each individual role session, which should greatly improve performance.
(cherry picked from commit bfb29ec)
Copy file name to clipboardExpand all lines: rules/integrations/aws/credential_access_new_terms_secretsmanager_getsecretvalue.toml
+22-8Lines changed: 22 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
creation_date = "2020/07/06"
3
3
integration = ["aws"]
4
4
maturity = "production"
5
-
updated_date = "2025/02/03"
5
+
updated_date = "2025/08/18"
6
6
7
7
[rule]
8
8
author = ["Nick Jones", "Elastic"]
@@ -12,18 +12,17 @@ attempt to leverage the compromised service to access secrets in AWS Secrets Man
12
12
a specific user identity has programmatically retrieved a secret value from Secrets Manager using the `GetSecretValue`
13
13
or `BatchGetSecretValue` actions. This rule assumes that AWS services such as Lambda functions and EC2 instances are
14
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 such as an EC2 instance, Lambda function, or other service would rely
16
-
on the compromised service's IAM role to access the secrets in Secrets Manager.
15
+
adversary with access to a compromised AWS service would rely on its' attached role to access the secrets in Secrets Manager.
17
16
"""
18
17
false_positives = [
19
18
"""
20
19
Verify whether the user identity, user agent, and/or hostname should be using GetSecretString API for the specified
21
20
SecretId. If known behavior is causing false positives, it can be exempted from the rule.
22
21
""",
23
22
]
24
-
from = "now-60m"
23
+
from = "now-6m"
25
24
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
26
-
interval = "10m"
25
+
interval = "5m"
27
26
language = "kuery"
28
27
license = "Elastic License v2"
29
28
name = "First Time Seen AWS Secret Value Accessed in Secrets Manager"
@@ -33,7 +32,7 @@ note = """## Triage and analysis
33
32
34
33
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.
35
34
36
-
This rule looks for the retrieval of credentials using `GetSecretValue` action in Secrets Manager programmatically. 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 specific secret value from Secrets Manager within the last 15 days.
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.
37
36
38
37
#### Possible investigation steps
39
38
@@ -53,7 +52,7 @@ This rule looks for the retrieval of credentials using `GetSecretValue` action i
53
52
54
53
### False positive analysis
55
54
56
-
- Review `user.id` values for expected ARNs. If this is an expected behavior, consider adding exceptions to the rule.
55
+
- Review `actor.entity.id` and `target.entity.id` values for expected combinations of identity and secret value access. If this is an expected behavior, consider adding exceptions to the rule.
57
56
- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of user agent and IP address conditions.
58
57
59
58
### Response and remediation
@@ -101,6 +100,21 @@ event.dataset:aws.cloudtrail and event.provider:secretsmanager.amazonaws.com and
101
100
not user_agent.name: ("Chrome" or "Firefox" or "Safari" or "Edge" or "Brave" or "Opera")
0 commit comments