AWS STS AssumeRoot by Rare User and Member Account
Identifies when the STS AssumeRoot action is performed by a rare user in AWS. The AssumeRoot action allows users to assume the root member account role, granting elevated but specific permissions based on the task policy specified. Adversaries who have compromised user credentials can use this technique to escalate privileges and gain unauthorized access to AWS resources. This is a New Terms rule that identifies when the STS AssumeRoot action is performed by a user that rarely assumes this role against a specific member account.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/11/24"
3integration = ["aws"]
4maturity = "production"
5updated_date = "2025/12/02"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies when the STS AssumeRoot action is performed by a rare user in AWS. The AssumeRoot action allows users to
11assume the root member account role, granting elevated but specific permissions based on the task policy specified.
12Adversaries who have compromised user credentials can use this technique to
13escalate privileges and gain unauthorized access to AWS resources. This is a New Terms rule that identifies
14when the STS AssumeRoot action is performed by a user that rarely assumes this role against a specific member account.
15"""
16false_positives = [
17 "AWS administrators or automated processes might regularly assume root for legitimate administrative purposes.",
18 "AWS services might assume root to access AWS resources as part of their standard operations.",
19 "Automated workflows might assume root to perform periodic administrative tasks.",
20]
21from = "now-6m"
22index = ["filebeat-*", "logs-aws.cloudtrail-*"]
23language = "kuery"
24license = "Elastic License v2"
25name = "AWS STS AssumeRoot by Rare User and Member Account"
26note = """
27## Triage and analysis
28
29> **Disclaimer**:
30> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance.
31> While every effort has been made to ensure its quality, validate and adapt it to suit your operational needs.
32
33### Investigating AWS STS AssumeRoot by Rare User and Member Account
34
35AWS STS `AssumeRoot` issues temporary credentials that grant elevated access into a member account, constrained by the
36task policy and target policy attached to the request. In normal operations, only a small set of platform, security, or
37automation roles should ever need to perform `AssumeRoot`, and typically only against a predictable set of member
38accounts.
39
40This rule is a New Terms rule that detects when a previously unseen combination of calling principal (`aws.cloudtrail.user_identity.arn`) and target member account (`aws.cloudtrail.resources.account_id`) successfully invokes `AssumeRoot`. Activity that matches this pattern may indicate privilege escalation, lateral movement into a new account, abuse of cross-account access paths, or misuse of administrative workflows.
41
42#### Possible investigation steps
43
44- **Identify the actor and target context**
45 - Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` to determine:
46 - Whether the caller is an IAM user, federated user, or role.
47 - Whether this identity is normally used for organization-level administration or automation.
48 - Inspect `aws.cloudtrail.resources.account_id` and `aws.cloudtrail.recipient_account_id` to identify the affected member account.
49 - Check `source.address`, `source.geo.*`, and `user_agent.original` to understand where and how the call was made (console, CLI, SDK, automation runner, VPN, corporate IP, etc.).
50
51- **Understand session, policy, and target details**
52 - Examine `aws.cloudtrail.request_parameters` for:
53 - `taskPolicyArn` – which predefined task policy was requested and what category of operations it enables (e.g., investigation, remediation, read-only, or broad admin).
54 - `targetPrincipal` and/or related target fields – which member account principal is being accessed.
55 - Any duration or configuration parameters (such as `durationSeconds`) that indicate unusually long-lived sessions.
56 - In `aws.cloudtrail.response_elements`, review:
57 - `credentials.accessKeyId` and `credentials.expiration` to confirm that credentials were successfully issued and how long they are valid.
58 - Any additional response fields that indicate session constraints or failures (if present).
59
60- **Correlate follow-on activity from the assumed root session**
61 - Use the temporary access key from `aws.cloudtrail.response_elements.credentials.accessKeyId` to pivot in CloudTrail:
62 - Search for subsequent events where `aws.cloudtrail.user_identity.access_key_id` matches that key.
63 - Look for high-impact actions such as:
64 - IAM changes (`iam:CreateUser`, `iam:AttachRolePolicy`, `iam:PutRolePolicy`, `iam:UpdateAssumeRolePolicy`).
65 - Guardrail changes (CloudTrail, Security Hub, Config, GuardDuty configuration or detector changes).
66 - Data-impacting actions (S3 bucket policy changes, RDS/RDS snapshot operations, EFS/RDS delete, secrets reads).
67 - Correlate with any prior events for the calling identity:
68 - STS calls that created the session used to invoke `AssumeRoot` (e.g., `AssumeRole`, SSO/identity provider activity).
69 - Recent IAM policy updates that broadened its ability to perform cross-account administration.
70
71- **Assess timing and operational alignment**
72 - Use `@timestamp`, `cloud.region`, and your change calendar to determine:
73 - Whether the event occurred during a documented maintenance window or deployment.
74 - Whether the region and account align with the caller’s normal operational scope.
75 - Compare with other events in the same time window:
76 - Organization-level changes, new account creation, or migration work.
77 - Other sensitive operations from the same `source.ip` or principal.
78
79- **Validate with owners**
80 - Confirm with:
81 - Cloud/infra platform teams that normally operate organization-level admin roles.
82 - Security/IR teams if they were running an investigation workflow that legitimately uses `AssumeRoot`.
83 - Check whether the use of `AssumeRoot` is documented in CI/CD or automation designs that might have just expanded to this account, explaining the New Terms trigger.
84
85### False positive analysis
86
87- **Legitimate administrative cross-account access**
88 - Platform, security, or central operations teams may use `AssumeRoot` as part of sanctioned workflows for:
89 - New account onboarding.
90 - Centralized remediation or investigation.
91 - Complex deployment or migration tasks.
92 - If this is the first time a specific engineer or automation role is onboarded to a given member account, the rule will fire once because it is a New Terms rule. Validate and, if appropriate, document this as expected behavior.
93
94- **Automation and scheduled workflows**
95 - CI/CD pipelines, organization-wide maintenance jobs, or incident response automation may use `AssumeRoot`:
96 - Identify automation roles and service principals that legitimately call `AssumeRoot`.
97 - Tune with rule exceptions based on `aws.cloudtrail.user_identity.arn`, `user_agent.original`, or specific `taskPolicyArn` values used only by trusted workflows.
98
99If a pattern emerges where specific roles regularly and legitimately assume root into a consistent set of accounts, consider documenting those identities and, if appropriate, creating narrow exceptions — while preserving coverage for new, unexpected combinations.
100
101### Response and remediation
102
103- **Contain potentially unauthorized sessions**
104 - If the activity appears suspicious or unapproved:
105 - Invalidate the credentials issued by `AssumeRoot` (where supported) or constrain their impact by immediately tightening IAM, SCPs, or network controls in the affected member account.
106 - Rotate or revoke long-lived access keys associated with the calling principal.
107 - Temporarily restrict permissions on roles allowed to call `AssumeRoot` until the investigation is complete.
108
109- **Investigate scope and impact**
110 - Using CloudTrail:
111 - Enumerate all actions performed with the `AssumeRoot` session access key and identify:
112 - Privilege changes (IAM users, roles, policies, permission boundaries, SCPs).
113 - Changes to logging and security controls (CloudTrail, GuardDuty, Security Hub, Config, firewall/WAF rules).
114 - Data-impacting operations on high-value services (S3, RDS, DynamoDB, Secrets Manager, KMS).
115 - Check if similar `AssumeRoot` activity has occurred recently from the same `source.ip`, principal, or member account.
116 - Engage application, data, and platform owners for the impacted account(s) to:
117 - Assess potential data exposure, integrity issues, or downtime.
118 - Determine whether any actions conflict with intended change plans.
119
120- **Hardening and preventive controls**
121 - Restrict and monitor `AssumeRoot` usage:
122 - Limit which IAM roles and identities can call `sts:AssumeRoot`, using IAM conditions (e.g., `aws:PrincipalArn`, `aws:PrincipalOrgID`, `aws:RequestedRegion`).
123 - Where possible, require strong authentication on the initiating principal (MFA, federated SSO, device posture).
124 - Add guardrails and observability:
125 - Use AWS Config, Security Hub, and/or AWS Organizations SCPs to:
126 - Detect or constrain highly privileged cross-account actions.
127 - Ensure logging and monitoring services cannot be disabled or modified by assumed sessions without additional friction.
128 - Ensure `AssumeRoot` activity is included in your SIEM dashboards and investigation playbooks.
129
130- **Post-incident improvements**
131 - If activity is confirmed malicious or unsafe:
132 - Rotate credentials for all involved principals and review recent STS session usage for anomalies.
133 - Update internal runbooks to clearly define when `AssumeRoot` is allowed, who can perform it, and how it should be documented.
134 - Refine this rule’s exceptions or tagging strategy so that legitimate, recurring workflows are well-understood, while preserving high-fidelity visibility into new or unexpected `AssumeRoot` behavior.
135
136### Additional information
137
138- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)**
139- **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)**
140- **Security Best Practices:** [AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/).
141"""
142references = ["https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html"]
143risk_score = 47
144rule_id = "962a71ae-aac9-11ef-9348-f661ea17fbce"
145severity = "medium"
146tags = [
147 "Domain: Cloud",
148 "Data Source: AWS",
149 "Data Source: Amazon Web Services",
150 "Data Source: AWS STS",
151 "Resources: Investigation Guide",
152 "Use Case: Identity and Access Audit",
153 "Tactic: Privilege Escalation",
154]
155timestamp_override = "event.ingested"
156type = "new_terms"
157
158query = '''
159event.dataset: "aws.cloudtrail"
160 and event.provider: "sts.amazonaws.com"
161 and event.action: "AssumeRoot"
162 and event.outcome: "success"
163'''
164
165
166[[rule.threat]]
167framework = "MITRE ATT&CK"
168[[rule.threat.technique]]
169id = "T1548"
170name = "Abuse Elevation Control Mechanism"
171reference = "https://attack.mitre.org/techniques/T1548/"
172[[rule.threat.technique.subtechnique]]
173id = "T1548.005"
174name = "Temporary Elevated Cloud Access"
175reference = "https://attack.mitre.org/techniques/T1548/005/"
176
177
178
179[rule.threat.tactic]
180id = "TA0004"
181name = "Privilege Escalation"
182reference = "https://attack.mitre.org/tactics/TA0004/"
183[[rule.threat]]
184framework = "MITRE ATT&CK"
185[[rule.threat.technique]]
186id = "T1098"
187name = "Account Manipulation"
188reference = "https://attack.mitre.org/techniques/T1098/"
189[[rule.threat.technique.subtechnique]]
190id = "T1098.003"
191name = "Additional Cloud Roles"
192reference = "https://attack.mitre.org/techniques/T1098/003/"
193
194
195
196[rule.threat.tactic]
197id = "TA0003"
198name = "Persistence"
199reference = "https://attack.mitre.org/tactics/TA0003/"
200
201[rule.investigation_fields]
202field_names = [
203 "@timestamp",
204 "user.name",
205 "user_agent.original",
206 "source.ip",
207 "aws.cloudtrail.user_identity.arn",
208 "aws.cloudtrail.user_identity.type",
209 "aws.cloudtrail.user_identity.access_key_id",
210 "aws.cloudtrail.resources.account_id",
211 "aws.cloudtrail.resources.type",
212 "event.action",
213 "event.outcome",
214 "cloud.account.id",
215 "cloud.region",
216 "aws.cloudtrail.request_parameters",
217 "aws.cloudtrail.response_elements"
218]
219
220[rule.new_terms]
221field = "new_terms_fields"
222value = ["aws.cloudtrail.user_identity.arn", "aws.cloudtrail.resources.account_id"]
223[[rule.new_terms.history_window_start]]
224field = "history_window_start"
225value = "now-7d"
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, validate and adapt it to suit your operational needs.
Investigating AWS STS AssumeRoot by Rare User and Member Account
AWS STS AssumeRoot issues temporary credentials that grant elevated access into a member account, constrained by the
task policy and target policy attached to the request. In normal operations, only a small set of platform, security, or
automation roles should ever need to perform AssumeRoot, and typically only against a predictable set of member
accounts.
This rule is a New Terms rule that detects when a previously unseen combination of calling principal (aws.cloudtrail.user_identity.arn) and target member account (aws.cloudtrail.resources.account_id) successfully invokes AssumeRoot. Activity that matches this pattern may indicate privilege escalation, lateral movement into a new account, abuse of cross-account access paths, or misuse of administrative workflows.
Possible investigation steps
-
Identify the actor and target context
- Review
aws.cloudtrail.user_identity.arnandaws.cloudtrail.user_identity.access_key_idto determine:- Whether the caller is an IAM user, federated user, or role.
- Whether this identity is normally used for organization-level administration or automation.
- Inspect
aws.cloudtrail.resources.account_idandaws.cloudtrail.recipient_account_idto identify the affected member account. - Check
source.address,source.geo.*, anduser_agent.originalto understand where and how the call was made (console, CLI, SDK, automation runner, VPN, corporate IP, etc.).
- Review
-
Understand session, policy, and target details
- Examine
aws.cloudtrail.request_parametersfor:taskPolicyArn– which predefined task policy was requested and what category of operations it enables (e.g., investigation, remediation, read-only, or broad admin).targetPrincipaland/or related target fields – which member account principal is being accessed.- Any duration or configuration parameters (such as
durationSeconds) that indicate unusually long-lived sessions.
- In
aws.cloudtrail.response_elements, review:credentials.accessKeyIdandcredentials.expirationto confirm that credentials were successfully issued and how long they are valid.- Any additional response fields that indicate session constraints or failures (if present).
- Examine
-
Correlate follow-on activity from the assumed root session
- Use the temporary access key from
aws.cloudtrail.response_elements.credentials.accessKeyIdto pivot in CloudTrail:- Search for subsequent events where
aws.cloudtrail.user_identity.access_key_idmatches that key. - Look for high-impact actions such as:
- IAM changes (
iam:CreateUser,iam:AttachRolePolicy,iam:PutRolePolicy,iam:UpdateAssumeRolePolicy). - Guardrail changes (CloudTrail, Security Hub, Config, GuardDuty configuration or detector changes).
- Data-impacting actions (S3 bucket policy changes, RDS/RDS snapshot operations, EFS/RDS delete, secrets reads).
- IAM changes (
- Search for subsequent events where
- Correlate with any prior events for the calling identity:
- STS calls that created the session used to invoke
AssumeRoot(e.g.,AssumeRole, SSO/identity provider activity). - Recent IAM policy updates that broadened its ability to perform cross-account administration.
- STS calls that created the session used to invoke
- Use the temporary access key from
-
Assess timing and operational alignment
- Use
@timestamp,cloud.region, and your change calendar to determine:- Whether the event occurred during a documented maintenance window or deployment.
- Whether the region and account align with the caller’s normal operational scope.
- Compare with other events in the same time window:
- Organization-level changes, new account creation, or migration work.
- Other sensitive operations from the same
source.ipor principal.
- Use
-
Validate with owners
- Confirm with:
- Cloud/infra platform teams that normally operate organization-level admin roles.
- Security/IR teams if they were running an investigation workflow that legitimately uses
AssumeRoot.
- Check whether the use of
AssumeRootis documented in CI/CD or automation designs that might have just expanded to this account, explaining the New Terms trigger.
- Confirm with:
False positive analysis
-
Legitimate administrative cross-account access
- Platform, security, or central operations teams may use
AssumeRootas part of sanctioned workflows for:- New account onboarding.
- Centralized remediation or investigation.
- Complex deployment or migration tasks.
- If this is the first time a specific engineer or automation role is onboarded to a given member account, the rule will fire once because it is a New Terms rule. Validate and, if appropriate, document this as expected behavior.
- Platform, security, or central operations teams may use
-
Automation and scheduled workflows
- CI/CD pipelines, organization-wide maintenance jobs, or incident response automation may use
AssumeRoot:- Identify automation roles and service principals that legitimately call
AssumeRoot. - Tune with rule exceptions based on
aws.cloudtrail.user_identity.arn,user_agent.original, or specifictaskPolicyArnvalues used only by trusted workflows.
- Identify automation roles and service principals that legitimately call
- CI/CD pipelines, organization-wide maintenance jobs, or incident response automation may use
If a pattern emerges where specific roles regularly and legitimately assume root into a consistent set of accounts, consider documenting those identities and, if appropriate, creating narrow exceptions — while preserving coverage for new, unexpected combinations.
Response and remediation
-
Contain potentially unauthorized sessions
- If the activity appears suspicious or unapproved:
- Invalidate the credentials issued by
AssumeRoot(where supported) or constrain their impact by immediately tightening IAM, SCPs, or network controls in the affected member account. - Rotate or revoke long-lived access keys associated with the calling principal.
- Temporarily restrict permissions on roles allowed to call
AssumeRootuntil the investigation is complete.
- Invalidate the credentials issued by
- If the activity appears suspicious or unapproved:
-
Investigate scope and impact
- Using CloudTrail:
- Enumerate all actions performed with the
AssumeRootsession access key and identify:- Privilege changes (IAM users, roles, policies, permission boundaries, SCPs).
- Changes to logging and security controls (CloudTrail, GuardDuty, Security Hub, Config, firewall/WAF rules).
- Data-impacting operations on high-value services (S3, RDS, DynamoDB, Secrets Manager, KMS).
- Check if similar
AssumeRootactivity has occurred recently from the samesource.ip, principal, or member account.
- Enumerate all actions performed with the
- Engage application, data, and platform owners for the impacted account(s) to:
- Assess potential data exposure, integrity issues, or downtime.
- Determine whether any actions conflict with intended change plans.
- Using CloudTrail:
-
Hardening and preventive controls
- Restrict and monitor
AssumeRootusage:- Limit which IAM roles and identities can call
sts:AssumeRoot, using IAM conditions (e.g.,aws:PrincipalArn,aws:PrincipalOrgID,aws:RequestedRegion). - Where possible, require strong authentication on the initiating principal (MFA, federated SSO, device posture).
- Limit which IAM roles and identities can call
- Add guardrails and observability:
- Use AWS Config, Security Hub, and/or AWS Organizations SCPs to:
- Detect or constrain highly privileged cross-account actions.
- Ensure logging and monitoring services cannot be disabled or modified by assumed sessions without additional friction.
- Ensure
AssumeRootactivity is included in your SIEM dashboards and investigation playbooks.
- Use AWS Config, Security Hub, and/or AWS Organizations SCPs to:
- Restrict and monitor
-
Post-incident improvements
- If activity is confirmed malicious or unsafe:
- Rotate credentials for all involved principals and review recent STS session usage for anomalies.
- Update internal runbooks to clearly define when
AssumeRootis allowed, who can perform it, and how it should be documented. - Refine this rule’s exceptions or tagging strategy so that legitimate, recurring workflows are well-understood, while preserving high-fidelity visibility into new or unexpected
AssumeRootbehavior.
- If activity is confirmed malicious or unsafe:
Additional information
- AWS IR Playbooks
- AWS Customer Playbook Framework
- Security Best Practices: AWS Knowledge Center – Security Best Practices.
References
Related rules
- AWS STS AssumeRole with New MFA Device
- AWS STS Role Assumption by Service
- AWS STS Role Assumption by User
- AWS IAM API Calls via Temporary Session Tokens
- Deprecated - AWS Root Login Without MFA