Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface
Blog post from Datadog
Amazon Machine Images (AMIs) are crucial templates for launching and scaling EC2 instances, and their management significantly affects the cloud attack surface. AMIs can be sourced privately as golden images, from public repositories, or from community sources, each presenting different security risks and trust boundaries. The article discusses how improper management of AMIs can lead to vulnerabilities such as insecure configurations, data leaks, and exposure to supply chain attacks. For instance, using unvetted public AMIs can introduce risks like embedded crypto miners or name confusion attacks, where malicious images mimic legitimate ones. To mitigate these risks, best practices include standardizing secure defaults using CIS benchmarks, routinely scanning AMIs for vulnerabilities, maintaining an inventory of active instances, and enforcing controls such as restrict searches by publisher and creating allowlists of approved images. The text also highlights the role of Datadog's security tools, like the whoAMI-scanner, in identifying and addressing unverified community AMIs, thereby helping organizations to prioritize remediation and reduce their cloud environment's exposure to potential threats.