Critical AWS Services Vulnerability Let Attackers Execute Remote Code

Hackers attack AWS as it hosts a vast number of high-value targets, including sensitive data, business applications, and cloud resources for organizations worldwide.

In February 2024, six AWS services were found to have some critical vulnerabilities. The services include CloudFormation, Glue, EMR, SageMaker, ServiceCatalog and CodeStar.

Cybersecurity analysts at Aquasec identified grave dangers associated with these vulnerabilities, such as remote code execution, full-service user takeover, AI module manipulation, sensitive data exposure, data exfiltration, and denial of service.

The major vulnerabilities identified included the “Shadow Resource” attack vector and the “Bucket Monopoly” technique.

Free Webinar on Detecting & Blocking Supply Chain Attack -> Book your Spot

AWS rectified the problems as soon as they were notified, however they advised users to implement the recommended mitigation measures since similar flaws might be present in other situations or services.

AWS Services Vulnerability

The automatic generation of S3 buckets for storing templates by AWS CloudFormation complies with a known terminology, “cf-templates-[12 char hash]-[region]”.

This pattern is consistent across regions except for the region name.

It is clear that this makes an opening for attackers to anticipate victim’s future use of Cloud formation and create buckets with matching names in unused regions.

If users initiate cloud formation in these regions, they may end up interacting unknowingly with attacker-owned ones consequently exposing themselves to risks of code execution, data manipulation, or account takeover.

This vulnerability affects numerous AWS services beyond CloudFormation as it is a “shadow resource.”

This relates to the fact that bucket names used globally are unique and also that some users are not even aware of automatically generated resources, which raises a fundamental security concern on AWS’ architecture.

Here below we have mentioned all vulnerabilities detected:-

  • AWS CloudFormation Vulnerability: “cf-templates-{Hash}-{Region}”
  • AWS Glue Vulnerability: “aws-glue-assets-{Account-ID}-{Region}”
  • AWS EMR Vulnerability: “aws-emr-studio-{Account-ID}-{Region}”
  • AWS SageMaker Vulnerability: “sagemaker-{Region}-{Account-ID}”
  • AWS CodeStar Vulnerability: “aws-codestar-{Region}-{Account-ID}”
  • AWS Service Catalog Vulnerability: “cf-templates-{Hash}-{Region}”

The number of open source projects that support AWS resource deployment is also vulnerable to similar “shadow resource” vulnerabilities. 

These can sometimes be seen when the projects generate S3 buckets with predictable names like account numbers or other unique identifiers. 

This predictability is what enables an attack type known as Bucket Monopoly where the attacker is able to identify naming patterns, discover unique IDs, and create multi-region buckets beforehand. 

The researcher further highlights the need for sensitization on treating Amazon Web Services (AWS) Account ID confidentially, securing resources fully, and maintaining active management of cloud-based resources.

Mitigations

Here below we have mentioned all the mitigations:-

  • Implement ‘aws:ResourceAccount’ Condition.
  • Verify the expected bucket owner.
  • Naming S3 Buckets.

Are you from SOC and DFIR Teams? Analyse Malware Incidents & get live Access with ANY.RUN -> Get 14 Days Free Access

Tushar Subhra

Tushar is a Cyber security content editor with a passion for creating captivating and informative content. With years of experience under his belt in Cyber Security, he is covering Cyber Security News, technology and other news.

Recent Posts

Critical TP-Link DHCP Vulnerability Let Attackers Execute Arbitrary Code Remotely

A critical security flaw has been uncovered in certain TP-Link routers, potentially allowing malicious actors…

2 days ago

Chinese SilkSpecter Hackers Attacking Black Friday Shoppers

SilkSpecter, a Chinese financially motivated threat actor, launched a sophisticated phishing campaign targeting e-commerce shoppers…

2 days ago

Cybercriminals Launch SEO Poisoning Attack to Lure Shoppers to Fake Online Stores

The research revealed how threat actors exploit SEO poisoning to redirect unsuspecting users to malicious…

2 days ago

Black Basta Ransomware Leveraging Social Engineering For Malware Deployment

Black Basta, a prominent ransomware group, has rapidly gained notoriety since its emergence in 2022…

2 days ago

Critical Laravel Vulnerability CVE-2024-52301 Allows Unauthorized Access

CVE-2024-52301 is a critical vulnerability identified in Laravel, a widely used PHP framework for building…

2 days ago

4M+ WordPress Websites to Attacks, Following Plugin Vulnerability

A critical vulnerability has been discovered in the popular "Really Simple Security" WordPress plugin, formerly…

2 days ago