T1548.005: 临时提升的云访问权限
摘要
攻击者可能滥用允许他们获得对云资源临时提升访问权限的权限配置。许多云环境允许管理员授予用户或服务账户权限,以请求对角色进行即时(just-in-time)访问、模拟其他账户、将角色传递给资源和服务,或以其他方式获得一组可能不同于其自身权限的短期访问权限。 即时访问是一种以细粒度、临时的方式向云账户授予额外角色的机制。这允许账户在日常基础上仅以其所需的权限运行,并在必要时请求额外权限。有时即时访问请求被配置为需要手动批准,而其他时候所需的权限会被自动授予。(Citation: Azure Just in Time Access 2023) 账户模拟允许用户或服务账户临时以另一账户的权限操作。例如,在 GCP 中,具有 `iam.serviceAccountTokenCreator` 角色的用户可以创建临时访问令牌或使用服务账户的权限签署任意载荷,而具有全域委派(domain-wide delegation)权限的服务账户被允许模拟 Google Workspace 账户。(Citation: Google Cloud Service Account Authentication Roles)(Citation: Hunters Domain Wide Delegation Google Workspace 2023)(Citation: Google Cloud Just in Time Access 2023)(Citation: Palo Alto Unit 42 Google Workspace Domain Wide Delegation 2023) 在 Exchange Online 中,`ApplicationImpersonation` 角色允许服务账户使用与指定用户账户关联的权限。(Citation: Microsoft Impersonation and EWS in Exchange) 许多云环境还包括使用户能够将角色传递给资源的机制,使其能够执行任务并向其他服务进行身份验证。虽然创建资源的用户不会直接承担其传递给资源的角色,但他们可能仍能够利用该角色的访问权限——例如,通过配置资源以使用其被授予的权限执行某些操作。在 AWS 中,具有 `PassRole` 权限的用户可以允许其创建的服务承担给定角色,而在 GCP 中,具有 `iam.serviceAccountUser` 角色的用户可以将服务账户附加到资源。(Citation: AWS PassRole)(Citation: Google Cloud Service Account Authentication Roles) 虽然用户需要特定的角色分配才能使用这些功能中的任何一个,但云管理员可能错误配置权限。这可能导致提升路径,使攻击者能够访问超出原本预期的资源。(Citation: Rhino Google Cloud Privilege Escalation)(Citation: Rhino Security Labs AWS Privilege Escalation) **注意:**此技术不同于[额外的云角色](https://attack.mitre.org/techniques/T1098/003),后者涉及向账户分配永久角色,而非滥用现有权限结构来获得对资源的临时提升访问权限。然而,攻陷了具有足够特权账户的攻击者可能授予他们控制的另一个账户[额外的云角色](https://attack.mitre.org/techniques/T1098/003),使其也能滥用这些功能。这也可能比直接使用高特权账户具有更高的隐蔽性,尤其是当日志没有明确说明角色模拟何时发生时。(Citation: CrowdStrike StellarParticle January 2022)
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- IaaS
- Office Suite
- Identity Provider
战术
权限提升
参考来源
- https://attack.mitre.org/techniques/T1548/005
- https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html
- https://www.crowdstrike.com/blog/observations-from-the-stellarparticle-campaign/
- https://cloud.google.com/architecture/manage-just-in-time-privileged-access-to-project
- https://cloud.google.com/iam/docs/service-account-permissions
- https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/impersonation-and-ews-in-exchange
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/approve-just-in-time-access
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/
- https://rhinosecuritylabs.com/gcp/privilege-escalation-google-cloud-platform-part-1/
- https://www.hunters.security/en/blog/delefriend-a-newly-discovered-design-flaw-in-domain-wide-delegation-could-leave-google-workspace-vulnerable-for-takeover
- https://unit42.paloaltonetworks.com/critical-risk-in-google-workspace-delegation-feature/