Skip to content

Commit c8d811f

Browse files
tuning 'AWS STS Temporary Credentials via AssumeRole'
1 parent 581ef73 commit c8d811f

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

rules/integrations/aws/privilege_escalation_sts_temp_creds_via_assume_role.toml

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

77

88
[rule]
@@ -42,11 +42,17 @@ timestamp_override = "event.ingested"
4242
type = "new_terms"
4343

4444
query = '''
45-
event.dataset:aws.cloudtrail
46-
and event.provider:sts.amazonaws.com
47-
and event.action:AssumeRole*
48-
and event.outcome:success
49-
and user.id:*
45+
event.dataset: "aws.cloudtrail"
46+
and event.provider: "sts.amazonaws.com"
47+
and event.action: "AssumeRole"
48+
and event.outcome: "success"
49+
and not (aws.cloudtrail.user_identity.invoked_by: (
50+
"config.amazonaws.com" OR
51+
"securityhub.amazonaws.com" OR
52+
"sso.amazonaws.com"
53+
)
54+
)
55+
and not (aws.cloudtrail.resources.arn: (*Amazon* OR *AWS* OR *Elastic* OR *Wiz* OR *DataDog*))
5056
'''
5157

5258

@@ -82,7 +88,7 @@ reference = "https://attack.mitre.org/tactics/TA0008/"
8288

8389
[rule.new_terms]
8490
field = "new_terms_fields"
85-
value = ["user.id", "aws.cloudtrail.flattened.request_parameters.roleArn"]
91+
value = ["aws.cloudtrail.resources.arn", "aws.cloudtrail.user_identity.invoked_by"]
8692
[[rule.new_terms.history_window_start]]
8793
field = "history_window_start"
8894
value = "now-10d"

0 commit comments

Comments
 (0)