Vulnerability could have led to RSA keys being stolen in AWS
Listening carefully to the neighbours on co-located servers could serve up an entire 2048-bit RSA key.
It's too close for comfort when you're co-locating in the cloud
Researchers have discovered a software flaw that could enable hackers to steal RSA cryptographic keys from other users in Amazon's AWS cloud service.
According to a paper published by Worcester Polytechnic Institute in New England, entitled "Seriously, Get Off My Cloud! Cross-VM RSA Key Recovery in a Public Cloud", one Amazon Elastic Compute Cloud (EC2) instance could be used to recover a whole 2048-bit RSA key used by a separate instance.
The attack targets the CPU with a last-level cache (LLC) attack that takes advantage of limitations in protection for the fast memory caches used by modern processors. “Last-level caches are shared across [processor] cores and are a suitable covert channel for cross-core attacks,” said the researchers.
Using attacks such as instance clock decay, the researchers demonstrated how they could overcome defences such as hypervisor hardware obfuscation to detect co-located virtual machine instances.
“After co-location is detected and verified, we perform the Prime and Probe attack to recover noisy keys from a carefully monitored Amazon EC2 VM running the aforementioned vulnerable libgcrypt library. We subsequently process the noisy data and obtain the complete 2048-bit RSA key used during encryption,” the researchers said.
While the findings raise concerns over the storage of cryptographic keys in AWS instances, the researchers said that they had alerted Amazon to the problem in June and that the problems had been fixed.
"The cross-VM leakage is present in public clouds and can become a practical attack vector for both co-location detection and data theft," the researchers said.
"Users have a responsibility to use latest improved software for their critical cryptographic operations. Additionally, placement policies for public cloud must be revised to diminish attackers' ability to co-locate with a targeted user.”
"Even further, we believe that smarter cache management policies are needed both at the hardware and software levels to prevent side-channel leakages and future exploits," they added.
The paper details some ways that could prevent key leakage.
"Placing multiple instances of a user on the same physical machine prevents co-location with a malicious attacker. Most cloud service providers, including Amazon EC2, offer single-tenant instances albeit as an expensive option. This option offers a number of benefits, including isolation from other users."
In a statement, Amazon said the the research “shows Amazon EC2 continues to strengthen its built-in, base level security measures, even when researchers perform complex attacks with extremely rare, unlikely pre-existing conditions and outdated third-party software”.
“AWS customers using current software and following security best practices are not impacted by this situation,” said a spokeswoman.
"Further, a patched version of the open source software targeted by this research (Libgcrypt) is publicly available for Amazon EC2 customers via their operating systems' standard software update mechanisms or direct download from the Libgcrypt project page. AWS encourages the reporting of any AWS security concerns to AWS Security."
Dr Dave Chismon, senior researcher at MWR InfoSecurity, told SCMagazineUK.com that while the work by Worcester Polytechnic is impressive, “the attacks described require a very high level of skill to recreate and attackers would still have great difficulty in targeting specific information on targets they do not control”.
“Where organisations are using multi-tenancy hosting, unfortunately there is not a great deal they can do to prevent these attacks beyond normal server hardening and patching, combined with monitoring to try and detect compromise,” he said.
Chismon added that the research “nicely demonstrates some of the conceptual issues of multi-tenancy, it both evaluates known techniques for identifying whether your virtual machine is sharing the same physical host as another VM but also presents a new method that abuses shared LLC (last level cache) memory on the CPU. Their method allowed them to probe and identify an RSA encryption key.”
He said that the paper demonstrates that from an architectural point of view multitenant virtual hosting such as AWS is potentially dangerous. If an issue was identified in components such as hardware or, for example, the Xen hypervisor, an attacker could break out of their VM onto others and depending on the vulnerability, gain full read/write access.
“As such, organisations wishing to use cloud services are recommended to opt for single tenancy machines for more sensitive virtual hosts and to keep the most sensitive hosts on-premises,” he added.