Skip to content

Commit c3ff0c9

Browse files
imays11tradebot-elastic
authored andcommitted
[Rule Tuning] AWS STS AssumeRole with New MFA Device (#4999)
* [Rule Tuning] AWS STS AssumeRole with New MFA Device This rule is triggering as expected and low volume of alerts in telemetry. This tuning: - slight edits to IG - removed user.id wildcard usage in query as this field always exists for these events - added the from and interval fields for consistency across rules (they are currently using the same values by default so no real change here) * adding investigation fields adding investigation fields (cherry picked from commit c151d69)
1 parent 8993d98 commit c3ff0c9

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

rules/integrations/aws/persistence_sts_assume_role_with_new_mfa.toml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/10/25"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/08/20"
66

77

88
[rule]
@@ -14,7 +14,9 @@ While a new MFA device is not always indicative of malicious behavior it should
1414
false_positives = [
1515
"AWS administrators or automated processes might regularly assume roles for legitimate administrative purposes and to perform periodic tasks such as data backups, updates, or deployments.",
1616
]
17+
from = "now-6m"
1718
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
19+
interval = "5m"
1820
language = "kuery"
1921
license = "Elastic License v2"
2022
name = "AWS STS AssumeRole with New MFA Device"
@@ -29,10 +31,10 @@ AWS Security Token Service (STS) allows users to assume roles and gain temporary
2931
3032
### Possible investigation steps
3133
32-
- Review the event details in AWS CloudTrail to identify the user who assumed the role, focusing on the user.id field to determine if the user is legitimate and authorized to use the new MFA device.
33-
- Check the serialNumber in the aws.cloudtrail.flattened.request_parameters to verify the registration and legitimacy of the new MFA device associated with the role assumption.
34-
- Investigate the context of the AssumeRole action by examining the event.action field to understand if it was part of a legitimate workflow or an unusual activity.
35-
- Analyze the event.outcome field to confirm the success of the role assumption and cross-reference with any recent changes in user permissions or MFA device registrations.
34+
- Review the event details in AWS CloudTrail to identify the user who assumed the role, focusing on the `user.id` or `aws.cloudtrail.user_identity.arn` field to determine if the user is legitimate and authorized to use the new MFA device.
35+
- Check the serialNumber in `aws.cloudtrail.request_parameters` to verify the registration and legitimacy of the new MFA device associated with the role assumption.
36+
- Investigate the context of the AssumeRole action by examining surrounding events to understand if it was part of a legitimate workflow or an unusual activity.
37+
- Cross-reference with any recent changes in user permissions or MFA device registrations.
3638
- Correlate the event with other logs or alerts to identify any patterns of suspicious behavior, such as multiple role assumptions or changes in MFA devices within a short timeframe.
3739
- Contact the user or relevant team to confirm if the new MFA device registration and role assumption were expected and authorized.
3840
@@ -83,10 +85,27 @@ event.dataset:aws.cloudtrail
8385
and event.provider:sts.amazonaws.com
8486
and event.action:(AssumeRole or AssumeRoleWithSAML or AssumeRoleWithWebIdentity)
8587
and event.outcome:success
86-
and user.id:*
8788
and aws.cloudtrail.flattened.request_parameters.serialNumber:*
8889
'''
8990

91+
[rule.investigation_fields]
92+
field_names = [
93+
"@timestamp",
94+
"user.name",
95+
"user_agent.original",
96+
"source.ip",
97+
"aws.cloudtrail.user_identity.arn",
98+
"aws.cloudtrail.user_identity.type",
99+
"aws.cloudtrail.user_identity.access_key_id",
100+
"aws.cloudtrail.resources.arn",
101+
"aws.cloudtrail.resources.type",
102+
"event.action",
103+
"event.outcome",
104+
"cloud.account.id",
105+
"cloud.region",
106+
"aws.cloudtrail.request_parameters",
107+
"aws.cloudtrail.response_elements"
108+
]
90109

91110
[[rule.threat]]
92111
framework = "MITRE ATT&CK"

0 commit comments

Comments
 (0)