Breaking down the Amazon EC2 key recovery attack

A research paper demonstrating a key recovery attack on Amazon Web Services' EC2 illustrates the risks of colocation and multi-tenancy in the cloud. Expert Rob Shapland explains.

The isolation of cloud data is a key security concern for both cloud providers and cloud users. The trust that cloud providers can keep organizations' data safe, especially from other cloud users, is of paramount importance to safely increasing the storage of sensitive data in the cloud. It is standard practice for infrastructure as a service providers, such as Amazon Web Services (AWS), to use multi-tenant servers, with single tenancy costing significantly more. This is known as cloud colocation and has been the subject of much security research to attempt to identify flaws that allow cross-instance access to data.

Researchers at Worcester Polytechnic Institute in Massachusetts recently uncovered a flaw that allows one Elastic Compute Cloud (EC2) instance in AWS to access data from a second instance, which should be entirely isolated. The key recovery attack completely compromised the 2048-bit RSA key, which first involved recognizing that the EC2 instance is situated on the same physical server as another, and then compromising the encryption key by taking advantage of a weakness in an out-of-date cryptographic library, called Libgcrypt.

Amazon was informed of the key recovery attack, and it was fixed in June. Amazon has also stated that users who followed their best practice guidelines would not have been affected; those best practices include keeping all software in an AWS instance up to date with the required security patches, as version 1.6.3 of Libgcrypt -- released in early 2015 -- addressed the vulnerability.

While the key recovery attack was technically exploitable to a highly skilled attacker, the prerequisites for the attack made it difficult to execute in a real-world scenario. It would be especially difficult, if not impossible, to target a specific organization with this attack, as the attacker would need to be able to choose the physical hardware on which their instance was installed.

The Worcester Polytechnic research paper is more an indication that although cloud security is improving rapidly, it still has some issues that need to be resolved -- especially in multi-tenant environments. However, a real-world attacker targeting an organization's cloud instances would be far more likely to target users of the AWS management console with phishing emails or other social engineering-style attacks than to attempt such a highly technical attack.

Although the key recovery attack was difficult to accomplish, there are still steps that should be taken, or at least considered, in order to reduce the risk from cloud colocation.

Although the key recovery attack was difficult to accomplish, there are still steps that should be taken, or at least considered, in order to reduce the risk from cloud colocation. The primary, albeit expensive, route is to pay the extra subscription cost for single tenancy, guaranteeing that there will be no malicious attackers with EC2 instances on the same hardware. This is an excellent way of defending the most sensitive corporate data that is stored in the cloud.

The key recovery attack demonstrated by the researchers would also not have been possible without taking advantage of a vulnerability in the out-of-date cryptographic library, which highlights the need for organizations to ensure their third-party software and libraries are kept up to date. The third method is to use monitoring systems on an organization's cloud instances to detect signs of compromise.

Overall, the research is highly impressive from a technical perspective, and provokes thought on whether cloud colocation and multi-tenancy are viable for organizations that wish to store their sensitive and confidential data in the cloud.

Next Steps

Read about how AWS performed a hypervisor security update without rebooting its cloud servers

Learn more about the cloud security tools that can protect AWS infrastructure

Discover why AWS Key Management Service bolsters cloud security

Dig Deeper on Cloud Data Storage, Encryption and Data Protection Best Practices