AWS_ASSUME_ROLE
Summary
FSProtect ACL Alias
AWS_ASSUME_ROLE
Edge Type
Attack Path
Affected Object Types
IAM Users, IAM Roles, AWS Services
Exploitation Certainty
Certain
AWS IAM Action / Condition
sts:AssumeRole on the target role
Description
AWS_ASSUME_ROLE represents the ability to call sts:AssumeRole against a target IAM role and obtain temporary security credentials scoped to that role's permissions.
When exploited, the caller receives a set of short-lived credentials — AccessKeyId, SecretAccessKey, and SessionToken — valid for up to 12 hours. These credentials grant the full permission set of the assumed role, which may be far more privileged than the caller's own identity.
This edge requires two conditions to hold simultaneously:
The source identity must have
sts:AssumeRoleallowed in its own IAM policies.The target role's trust policy must explicitly permit the source identity as a principal.
Cross-account role assumption is common in AWS multi-account architectures. In this case, the trust policy of the target role in Account B lists a principal from Account A. An attacker who compromises an identity in Account A may therefore pivot to Account B without any credentials native to that account.
Condition keys frequently used to restrict this path include aws:MultiFactorAuthPresent, sts:ExternalId, aws:SourceIp, and aws:PrincipalOrgID. Conditions that are misconfigured or absent are a primary source of over-permissive assume-role chains.
Identification
AWS CLI
Retrieve the trust policy of a role to determine who can assume it:
Simulate whether the current identity can assume a specific role:
Enumerate all roles whose trust policies include a specific principal:
AWS Console
Open IAM → Roles → select the target role.
Open the Trust relationships tab.
Review the trust policy JSON —
Principaldefines who can callAssumeRole, andConditionblocks restrict when it is allowed.To check if a source identity has the permission to call
sts:AssumeRole, open that user or role and use Policy Simulator under Actions.
Exploitation
Assume the target role and retrieve temporary credentials:
Export the returned credentials into the shell environment:
Verify the assumed identity:
For cross-account scenarios, the trust policy may require an ExternalId condition. If the ExternalId value is known or guessable, pass it directly:
Mitigation
Apply least privilege to trust policies — list only the specific principals that genuinely need to assume the role.
Use
aws:PrincipalOrgIDto restrict cross-account assumptions to accounts within the same organization.Require MFA for sensitive role assumptions by adding
aws:MultiFactorAuthPresent: 'true'as a condition.Use
sts:ExternalIdfor third-party cross-account access, and treat the external ID as a shared secret — do not expose it.Avoid wildcards (
"Principal": "*") in trust policies; they allow any authenticated AWS principal to attempt assumption.Set
MaxSessionDurationon roles to the minimum required value to limit credential lifetime.
Detection
Monitor CloudTrail for AssumeRole activity:
Event source:
sts.amazonaws.comEvent name:
AssumeRole
High-value signals:
Cross-account role assumptions where the source account is not a known internal account.
Session names that do not follow a consistent naming convention (automated or tool-generated sessions often have predictable patterns).
Repeated assumption attempts that result in
AccessDenied(trust policy enumeration).Assumptions of high-privilege roles (admin roles, deploy roles, break-glass roles) outside normal business hours.
References
Last updated
Was this helpful?