Cross-source coverage
T1548.005 / ATT&CK
Abuse Elevation Control Mechanism: Temporary Elevated Cloud Access
7 rules across 1 source.
From MITRE ATT&CK 19.2
Adversaries may abuse permission configurations that allow them to gain temporarily elevated access to cloud resources. Many cloud environments allow administrators to grant user or service accounts permission to request just-in-time access to roles, impersonate other accounts, pass roles onto resources and services, or otherwise gain short-term access to a set of privileges that may be distinct from their own.
Just-in-time access is a mechanism for granting additional roles to cloud accounts in a granular, temporary manner. This allows accounts to operate with only the permissions they need on a daily basis, and to request additional permissions as necessary. Sometimes just-in-time access requests are configured to require manual approval, while other times the desired permissions are automatically granted.
Account impersonation allows user or service accounts to temporarily act with the permissions of another account. For example, in GCP users with the iam.serviceAccountTokenCreator role can create temporary access tokens or sign arbitrary payloads with the permissions of a service account, while service accounts with domain-wide delegation permission are permitted to impersonate Google Workspace accounts. In Exchange Online, the ApplicationImpersonation role allows a service account to use the permissions associated with specified user accounts.
Many cloud environments also include mechanisms for users to pass roles to resources that allow them to perform tasks and authenticate to other services. While the user that creates the resource does not directly assume the role they pass to it, they may still be able to take advantage of the role's access -- for example, by configuring the resource to perform certain actions with the permissions it has been granted. In AWS, users with the PassRole permission can allow a service they create to assume a given role, while in GCP, users with the iam.serviceAccountUser role can attach a service account to a resource.
While users require specific role assignments in order to use any of these features, cloud administrators may misconfigure permissions. This could result in escalation paths that allow adversaries to gain access to resources beyond what was originally intended.
Note: this technique is distinct from Additional Cloud Roles, which involves assigning permanent roles to accounts rather than abusing existing permissions structures to gain temporarily elevated access to resources. However, adversaries that compromise a sufficiently privileged account may grant another account they control Additional Cloud Roles that would allow them to also abuse these features. This may also allow for greater stealth than would be had by directly using the highly privileged account, especially when logs do not clarify when role impersonation is taking place.
- Tactics
- Privilege Escalation
- Platforms
- IaaS · Office Suite · Identity Provider
- Telemetry
-
AWS:CloudTrailgcp:iamgcp:workspaceauditm365:unifiedm365:signinlogs
How MITRE says to detect it DET0393
Detection Strategy for Temporary Elevated Cloud Access Abuse (T1548.005)
IaaS Analytic 1105
Multiple AWS CloudTrail events indicating temporary privilege escalation via PassRole and AssumeRole targeting newly created services or non-interactive infrastructure.
AWS:CloudTrailPassRole
Identity Provider Analytic 1106
Token creation or access delegation where a user impersonates a higher-privileged service account or performs domain-wide delegation actions, such as GCP's serviceAccountTokenCreator or Workspace impersonation.
gcp:iamPrincipalEmail with serviceAccountTokenCreator impersonating new identitygcp:workspaceauditToken Generation via Domain Delegation
Office Suite Analytic 1107
Detection of ApplicationImpersonation role assignment or delegated mailbox access to service principals or rarely used users, especially outside of normal hours or geographic norms.
m365:unifiedAdd-MailboxPermission or Set-ManagementRoleAssignmentm365:signinlogsUnusual sign-in from service principal to user mailbox
elastic/detection-rules
7 rules| Detection | Severity | Format |
|---|---|---|
| AWS EC2 Instance Profile Associated with Running Instance | High | Elastic TOML |
| AWS STS AssumeRoot by Rare User and Member Account | High | Elastic TOML |
| AWS STS GetFederationToken with AdministratorAccess in Request | High | Elastic TOML |
| AWS IAM Customer Managed Policy Version Created or Default Version Set | Medium | Elastic TOML |
| AWS KMS Key Policy Updated via PutKeyPolicy | Medium | Elastic TOML |
| AWS IAM Customer-Managed Policy Attached to Role by Rare User | Low | Elastic TOML |
| AWS STS Role Assumption by Service | Low | Elastic TOML |