T1098.001: 额外的云凭证
摘要
攻击者可能向云账户添加由攻击者控制的凭证,以维持对环境中受害者账户和实例的持久访问。 例如,攻击者可能在 Azure / Entra ID 中,在现有合法凭证之外添加服务主体(Service Principal)和应用程序(Application)的凭证。(Citation: Microsoft SolarWinds Customer Guidance)(Citation: Blue Cloud of Death)(Citation: Blue Cloud of Death Video)这些凭证包括 x509 密钥和密码。(Citation: Microsoft SolarWinds Customer Guidance)在拥有足够权限的情况下,有多种方式添加凭证,包括 Azure 门户、Azure 命令行界面,以及 Azure 或 Az PowerShell 模块。(Citation: Demystifying Azure AD Service Principals) 在基础设施即服务(IaaS)环境中,攻击者在通过 [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004) 获得访问权限后,可能使用 AWS 中的 <code>CreateKeyPair</code> 或 <code>ImportKeyPair</code> API,或 GCP 中的 <code>gcloud compute os-login ssh-keys add</code> 命令来生成或导入自己的 SSH 密钥。(Citation: GCP SSH Key Add)这允许对云环境中的实例进行持久访问,而无需进一步使用已沦陷的云账户。(Citation: Expel IO Evil in AWS)(Citation: Expel Behind the Scenes) 攻击者还可能使用 AWS 中的 <code>CreateAccessKey</code> API 或 GCP 中的 <code>gcloud iam service-accounts keys create</code> 命令向账户添加访问密钥。或者,他们可能使用 AWS 中的 <code>CreateLoginProfile</code> API 添加一个密码,用于登录 AWS 管理控制台以进行 [Cloud Service Dashboard](https://attack.mitre.org/techniques/T1538)。(Citation: Permiso Scattered Spider 2023)(Citation: Lacework AI Resource Hijacking 2024)如果目标账户与发起请求的账户具有不同的权限,攻击者还可能能够在环境中提升其权限(即 [Cloud Accounts](https://attack.mitre.org/techniques/T1078/004))。(Citation: Rhino Security Labs AWS Privilege Escalation)(Citation: Sysdig ScarletEel 2.0)例如,在 Entra ID 环境中,拥有应用程序管理员角色的攻击者可以向其应用程序的服务主体添加一组新凭证。这样做,攻击者将能够访问该服务主体的角色和权限,这些角色和权限可能与应用程序管理员的不同。(Citation: SpecterOps Azure Privilege Escalation) 在 AWS 环境中,拥有适当权限的攻击者还可能使用 `sts:GetFederationToken` API 调用创建一组临时凭证,以 [Forge Web Credentials](https://attack.mitre.org/techniques/T1606),并绑定到原始用户账户的权限。即使原始账户的 API 凭证被停用,这些临时凭证在其生命周期内可能仍然有效。(Citation: Crowdstrike AWS User Federation Persistence) 在启用了应用密码功能的 Entra ID 环境中,攻击者可能能够向用户账户添加应用密码。(Citation: Mandiant APT42 Operations 2024)由于应用密码旨在与不支持多因素认证(MFA)的遗留设备一起使用,添加应用密码可以让攻击者绕过 MFA 要求。此外,即使用户的主密码被重置,应用密码也可能仍然有效。(Citation: Microsoft Entra ID App Passwords)
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- IaaS
- Identity Provider
- SaaS
战术
持久化
参考来源
- https://attack.mitre.org/techniques/T1098/001
- https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/
- https://expel.io/blog/finding-evil-in-aws/
- https://posts.specterops.io/azure-privilege-escalation-via-service-principal-abuse-210ae2be2a5
- https://nedinthecloud.com/2019/07/16/demystifying-azure-ad-service-principals/
- https://www.lacework.com/blog/detecting-ai-resource-hijacking-with-composite-alerts
- https://cloud.google.com/sdk/gcloud/reference/compute/os-login/ssh-keys/add
- https://permiso.io/blog/lucr-3-scattered-spider-getting-saas-y-in-the-cloud
- https://www.youtube.com/watch?v=wQ1CuAPnrLM&feature=youtu.be&t=2815
- https://speakerdeck.com/tweekfawkes/blue-cloud-of-death-red-teaming-azure-1
- https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-app-passwords
- https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/
- https://cloud.google.com/blog/topics/threat-intelligence/untangling-iran-apt42-operations
- https://expel.io/blog/behind-the-scenes-expel-soc-alert-aws/
- https://sysdig.com/blog/scarleteel-2-0/
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/