Additional Cloud Roles

T1098.003

Sub-technique of T1098 Account Manipulation.View on attack.mitre.org

About this technique

An adversary may add additional roles or permissions to an adversary-controlled cloud account to maintain persistent access to a tenant. For example, adversaries may update IAM policies in cloud-based environments or add a new global administrator in Office 365 environments. With sufficient permissions, a compromised account can gain almost unlimited access to data and settings (including the ability to reset the passwords of other admins).

This account modification may immediately follow Create Account or other malicious account activity. Adversaries may also modify existing Valid Accounts that they have compromised. This could lead to privilege escalation, particularly if the roles added allow for lateral movement to additional accounts.

For example, in AWS environments, an adversary with appropriate permissions may be able to use the CreatePolicyVersion API to define a new version of an IAM policy or the AttachUserPolicy API to attach an IAM policy with additional or distinct permissions to a compromised user account.

In some cases, adversaries may add roles to adversary-controlled accounts outside the victim cloud tenant. This allows these external accounts to perform actions inside the victim tenant without requiring the adversary to Create Account or modify a victim-owned account.

Detection rules26

Rules on DetectionCode tagged with T1098.003.

Sigma7

Splunk19

RuleTypeRiskData source
Azure AD Admin Consent Bypassed by Service PrincipalTTPNULLAzure Active Directory Add app role assignment to service principal
Azure AD Application Administrator Role AssignedTTPNULLAzure Active Directory Add member to role
Azure AD FullAccessAsApp Permission AssignedTTPNULLAzure Active Directory Update application
Azure AD Global Administrator Role AssignedTTPNULLAzure Active Directory Add member to role
Azure AD PIM Role AssignedTTPNULLAzure Active Directory
Azure AD PIM Role Assignment ActivatedTTPNULLAzure Active Directory
Azure AD Privileged Role AssignedTTPNULLAzure Active Directory Add member to role
Azure AD Privileged Role Assigned to Service PrincipalTTPNULLAzure Active Directory Add member to role
Azure AD Service Principal Privilege EscalationTTPNULLAzure Active Directory Add app role assignment to service principal
Azure AD Tenant Wide Admin Consent GrantedTTPNULLAzure Active Directory Consent to application
O365 Admin Consent Bypassed by Service PrincipalTTPNULLO365 Add app role assignment to service principal.
O365 Application Available To Other TenantsTTPNULLOffice 365 Universal Audit Log
O365 FullAccessAsApp Permission AssignedTTPNULLO365 Update application.
O365 High Privilege Role GrantedTTPNULLO365 Add member to role.
O365 Mailbox Read Access Granted to ApplicationTTPNULLO365 Update application.

Groups3

Software0

None recorded.

Campaigns2

Procedure examples5

Groups3

Used byProcedure example
GroupLAPSUS$

LAPSUS$ has added the global admin role to accounts they have created in the targeted organization's cloud instances.

GroupScattered Spider

Scattered Spider has assigned user access admin roles in order to gain Tenant Root Group management permissions in Azure.

GroupStorm-0501

Storm-0501 has elevated their access to Azure resources using `Microsoft.Authorization/elevateAccess/action` and `Microsoft.Authorization/roleAssignments/write` operations to gain User Access Administrator and Owner Azure roles over the victims’ Azure subscriptions.

Campaigns2

Used byProcedure example
CampaignC0027

During C0027, Scattered Spider used IAM manipulation to gain persistence and to assume or elevate privileges.

CampaignSolarWinds Compromise

During the SolarWinds Compromise, APT29 granted `company administrator` privileges to a newly created service principle.

References7

  1. AWS IAM Policies and Permissions Open source
    AWS. (n.d.). Policies and permissions in IAM. Retrieved April 1, 2022.
  2. Expel AWS Attacker Open source
    Brian Bahtiarian, David Blanton, Britton Manahan and Kyle Pellett. (2022, April 5). Incident report: From CLI to console, chasing an attacker in AWS. Retrieved April 7, 2022.
  3. Google Cloud IAM Policies Open source
    Google Cloud. (2022, March 31). Understanding policies. Retrieved April 1, 2022.
  4. Invictus IR DangerDev 2024 Open source
    Invictus Incident Response. (2024, January 31). The curious case of DangerDev@protonmail.me. Retrieved March 19, 2024.
  5. Microsoft O365 Admin Roles Open source
    Ako-Adjei, K., Dickhaus, M., Baumgartner, P., Faigel, D., et. al.. (2019, October 8). About admin roles. Retrieved October 18, 2019.
  6. Microsoft Support O365 Add Another Admin, October 2019 Open source
    Microsoft. (n.d.). Add Another Admin. Retrieved October 18, 2019.
  7. Rhino Security Labs AWS Privilege Escalation Open source
    Spencer Gietzen. (n.d.). AWS IAM Privilege Escalation – Methods and Mitigation. Retrieved May 27, 2022.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.