SecOraLens
CriticalRansomware

Understanding the Risks of Public AWS AMIs: Hidden Dangers of Malicious and Misconfigured Images

Qualys Blog·Source published ·1 min read

What happened?

Key Takeaways Public Amazon Machine Images (AMIs) speed up deployment, but anyone can publish one, so they should never be trusted based on their name or description alone. Malicious or misconfigured AMIs can carry vulnerable software, embedded malware, exposed credentials, or insecure configurations that compromise workloads as soon as they launch. The whoAMI attack, disclosed by Datadog Security Labs, shows how attackers can publish look-alike images that get picked up by pipelines that don’t verify the AMI owner.

Key details

  • Public AMIs can be published by anyone and should not be trusted based on name or description alone.
  • Malicious or misconfigured AMIs may contain vulnerable software, embedded malware, exposed credentials, or insecure configurations.
  • The whoAMI attack shows how attackers publish look-alike images that get selected by pipelines that do not verify the AMI owner.
  • A single compromised source image can spread through Golden AMIs to every account, region, and workload built from it.
  • Qualys TotalCloud provides snapshot-based AMI scanning before deployment without launching an EC2 instance or installing an agent.

What is affected?

  • Public Amazon Machine Images (AMIs) available to AWS customers in shared regions.
  • Golden AMIs derived from untrusted public AMIs, vulnerable marketplace images, or internally compromised images.

How do I fix or mitigate it?

  1. Build and regularly rebuild Golden AMIs through CI/CD pipelines with latest patches and hardened configurations.
  2. Restrict public sharing of internally created AMIs and remove sensitive data before sharing.
  3. Use AWS Allowed AMIs to enforce trusted image sources and restrict instance launches to vetted images.
  4. Maintain centralized inventory of approved AMIs, track lineage, review sharing permissions, and remove obsolete AMIs.

What should defenders look for?

  • EC2 instances launched from unknown or unapproved AMIs.
  • AMIs becoming publicly accessible unexpectedly.
  • Malware establishing persistence and communicating with attacker-controlled infrastructure.
  • Credential theft, lateral movement, and compromise of additional cloud resources.

Summarised by SecOraLens from Qualys Blog. Always read the original source before acting. How SecOraLens verifies advisories.

What to do next

For CISOs and SOC leads

Brief your board. Brief your team.

Executive risk briefs for governance, technical kill-chains for the SOC — delivered as advisories publish. Critical alerts within 1 hour. No spam, unsubscribe anytime.