Preventing This Week’s AWS Cryptomining Attacks: Why Detection Fails and Permissions Matter
嗯,用户让我用中文总结一篇文章,控制在100字以内,而且不需要特定的开头。我先看看这篇文章讲什么。文章主要讲最近发现的一个针对亚马逊云资源的挖矿活动,攻击者利用了受损的凭证来执行一些特权API调用,比如创建启动模板和注册任务定义之类的。现有的检测工具只能在异常发生后发现,但无法阻止攻击。然后文章介绍了Sonrai公司的云权限防火墙,它通过阻止这些特权权限来预防攻击。研究显示92%的用户其实不需要这些权限,所以防火墙默认拒绝,只允许8%需要的用户使用。这样就能有效阻止攻击者所需的API调用。文章还提到防火墙还能发送警报给相关团队,并且通过分析历史使用情况来自动限制权限。最后测试显示防火墙能100%预防攻击。 好的,我需要把这些关键点浓缩到100字以内。首先提到攻击方式:利用受损凭证执行特权API调用。然后说明传统检测工具的不足:只能事后发现。接着介绍解决方案:云权限防火墙,默认拒绝特权权限,只允许必要用户使用。这样就能阻止攻击者的API调用,并且及时通知团队。 再检查一下字数,确保不超过限制。可能需要调整句子结构,使其更简洁明了。 </think> 文章指出,近期针对亚马逊云资源的挖矿攻击利用受损凭证执行特权API调用。传统检测工具仅能事后发现异常,无法阻止攻击。Sonrai云权限防火墙通过默认拒绝特权权限(仅允许8%必要用户使用),有效阻止攻击所需API调用,并即时通知团队采取行动。 2025-12-19 18:7:38 Author: securityboulevard.com(查看原文) 阅读量:3 收藏

The recent discovery of a cryptomining campaign targeting Amazon compute resources highlights a critical gap in traditional cloud defense. Attackers are bypassing perimeter defenses by leveraging compromised credentials to execute legitimate but privileged API calls like ec2:CreateLaunchTemplate, ecs:RegisterTaskDefinition, ec2:ModifyInstanceAttribute, and lambda:CreateFunctionUrlConfig.

While detection tools identify anomalies after they occur, they do not prevent execution, lateral movement, or persistence by the bad actor. The Sonrai Cloud Permissions Firewall neutralizes this kill chain by protecting the privileged permissions that enable the attack, but are rarely needed by most cloud identities. Research shows that 92% of identities granted these privileged permissions never use them. By enforcing a “Global Default Deny” on these privileges and allowing only the 8% of identities that actually require them, the Firewall proactively blocks the API calls required to complete these attacks.

Detection can only observe cryptomining after it starts; the Cloud Permissions Firewall prevents it by design by denying the exact permissions attackers must use to launch and sustain mining infrastructure.

Prevention is the best cure

The cryptomining campaign leverages compromised identity credentials to execute privileged API calls. The Sonrai Cloud Permissions Firewall disrupts this sequence by protecting privileged permissions, causing the attack to fail. The Firewall also sends instant notifications of the attempts to use privileged permissions to the teams responsible for running workloads – the teams that are most likely to recognize the behavior as unexpected.

Specific details from this week’s attack: The adversary uses compromised credentials to spin up compute resources using templates created via ecs:RegisterTaskDefinition and ec2:CreateLaunchProfile. This is where financial damage begins. The attacker can scale up cryptominers within ECS clusters or as part of EC2 AutoScaling groups.

Firewall Countermeasure: Automated Least Privilege

  • Mechanism: The Firewall analyzes the identity’s historical usage (typically over 90 days). Even if a user has broad administrative policies attached, the firewall detects that specific privileged permissions, such as ecs:RegisterTaskDefinition or ec2:CreateLaunchProfile, have not been used recently.
  • The Block: The firewall protects these permissions from the effective policy using a global policy mechanism like a Service Control Policy (SCP) or Resource Control Policy (RCP). When the attacker attempts to call them using the stolen credentials, the API returns AccessDenied.
  • Impact: No compute resources are provisioned, no mining occurs, and no bill is incurred. The team is instantly notified of the compromised identity attempting these API calls, and is granted the opportunity to re-enable access, were the requests legitimate.

Preventing Escalation and Persistence

To maintain access and expand their footprint, attackers used iam:CreateUser, iam:CreateAccessKey, or iam:AttachUserPolicy to generate new backdoor accounts. 

Additionally, to maintain external access to the cloud environment, attackers used unauthenticated and publicly invocable Lambda Functions. The functions were created using lambda:CreateFunction, and their publicly accessible invocation URL was created using lambda:CreateFunctionUrlConfig.

Lastly, to persist the EC2 compute resources amid attempts to remove them, attackers used ec2:ModifyInstanceAttribute to complicate terminating the malicious computes by toggling the “disableApiTermination” setting.

Firewall Countermeasure: Toxic Combination Blocking

  • Mechanism: Permissions like these are classified as privileged “Risk Amplifiers.” The Firewall restricts these permissions strictly to the specific identities that require them for legitimate orchestration logic.
  • The Block: If a compromised credential attempts to escalate privileges, create a new identity, or establish persistence, the action is blocked because the identity is not on the exemption list for that specific sensitive permission.
  • Impact: The attacker is contained. They cannot create backdoor access or hard-to-remove resources.

Empirical Evidence

In independent penetration testing, the Cloud Permissions Firewall achieved a 100% prevention rate against highly vulnerable AWS accounts. The testing was commissioned by Sonrai Security and conducted by Software Secured using industry-standard attack simulations such as CloudGoat and IAM Vulnerable.

Test Scenario Critical Privileged Permission Result (Unprotected) Result (Firewall Protected)
Lateral Movement ssm:StartSession Success (Pivot Completed) BLOCKED (Permission Stripped)
Privilege Escalation iam:CreatePolicyVersion Success (Admin Access Gained) BLOCKED (Permission Stripped)
Persistance iam:CreateAccessKey Success (Credentials Created) BLOCKED (Permission Stripped)

Bottom Line: The Cloud Permissions Firewall blocked 16 out of 16 tested attack paths, specifically by denying the privileged API calls required to execute the kill chain.

Operationalizing Prevention without Friction

A common concern with locking down privileged permissions is the impact on developer velocity. The Sonrai Cloud Permissions Firewall addresses this through Permissions-on-Demand.

  • The Workflow: If a legitimate developer needs to create an EC2 launch template (ec2:CreateLaunchTemplate) for a new project, they are blocked initially if they haven’t used it before.
  • The Resolution: They receive an instant notification via Slack or Teams. They request access (e.g., “Need EC2 access for 4 hours”).
  • The Outcome: Upon automated or manual approval, the firewall updates the policy in real-time, granting the permission.
  • The Security Gain: This ensures that standing privileges—which attackers rely on—are eliminated. Access exists only when needed and approved.

The Early Warning System: Regions and Services

While restricting Privileged Permissions is the primary mechanism for stopping attacks, the Cloud Permissions Firewall also utilizes Region Lockdown and Unused Service protection as a critical safety net.

If an attacker attempts to launch resources in an obscure region (e.g., ap-northeast-3) or access a service the identity has never used before, the Firewall blocks the action immediately. Crucially, this block acts as a high-fidelity early warning alarm. Because legitimate users rarely veer into unused regions or services, a block event here is a strong indicator of a misbehaving identity or a compromised credential, allowing security teams to investigate before the attacker can find a valid path to execution.

Conclusion

This recent campaign serves as a reminder that identity is the new perimeter. While detection is necessary, it is no longer sufficient against automated resource theft. By deploying a Cloud Permissions Firewall to actively manage privileged permissions, organizations move from a reactive posture—cleaning up after a breach—to a preventative one, stopping the cryptomining kill chain at the very first API call.

*** This is a Security Bloggers Network syndicated blog from Sonrai | Enterprise Cloud Security Platform authored by Nigel Sood. Read the original post at: https://sonraisecurity.com/blog/preventing-this-weeks-aws-cryptomining-attacks-why-detection-fails-and-permissions-matter/


文章来源: https://securityboulevard.com/2025/12/preventing-this-weeks-aws-cryptomining-attacks-why-detection-fails-and-permissions-matter/
如有侵权请联系:admin#unsafe.sh