Cross-VM side-channel attacks: How to defend cloud infrastructures

Expert Dave Shackleford analyzes the likelihood and effects of cross-VM side channel attacks in the cloud and offers mitigations for concerned users.

Recently, a group of researchers at several universities and RSA Laboratories unveiled an insidious side-channel...

attack method that one virtual machine can use against another within a cloud environment, with the target VM's encryption key ultimately being compromised.

Any sensitive data that had been encrypted with the target VM's key could be compromised, resulting in a potential gold mine for a determined attacker.

What are the implications of this research? Any sensitive data that had been encrypted with the target virtual machine's (VM) key could be compromised, resulting in a potential gold mine for a determined attacker.

Though enterprise cloud computing users should be concerned by this discovery, there are some mitigations that can be put in place to defend against such side-channel attacks. That's what we'll discuss in this tip.

Cross-VM side-channel attack details

It should be noted that this research is not the first documented case of a successful cloud-based side-channel attack. In 2009, researchers from the University of California and MIT published, Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds, a paper that explored mapping the location of cloud-based VMs through network scanning tactics dubbed cloud cartography. They deliberately positioned a malicious VM on the same physical hypervisor platform, and then accessed shared hardware and cache locations to perform a variety of side-channel attacks, including denial of service (DoS), hardware utilization detection, remote keystroke monitoring via timing inference and others. The paper specifically referenced the use of side-channel attacks to extract cryptographic keys, but noted that the methods the researchers employed at that time were not sufficient to allow the access necessary to compromise the key.

Fast forward to the present and the researchers behind this new effort, documented in a paper titled, In Cross-VM Side Channels and Their Use to Extract Private Keys, and who have successfully targeted cryptographic keys using the same sort of side-channel attack. To pull off this complex attack, the researchers leveraged a shared hardware cache between both VMs and filled the cache with data from the attacking machine. The target VM overwrites some of that data with its own, including information about the cryptographic key. The manner in which the data was overwritten allowed the researchers to ultimately hijack the 4096-bit ElGamal encryption key being used with the GNU Privacy Guard application in hours.

The good news for security and operations teams is that this kind of attack is likely impractical for all but the most sophisticated attackers. The bad news is that this type of attack might be possible in the right conditions. Given the lack of technical details many organizations receive from cloud providers regarding technology and architecture within provider environments, understanding the real risk posed by side-channel attacks may prove elusive.

Preventing side-channel attacks

There are two questions that IT security and operations professionals should ask at this point: "Is this type of attack possible in my environment?" and "What can we do to mitigate the risk?" The answer to the first question is a resounding "NO" at this point. Without fairly detailed knowledge of the environment, as well as some detail of and control over the hypervisor infrastructure and VMs in use on these platforms, attackers will have a difficult time launching side-channel attacks, particularly the more sophisticated kind that results in Holy Grail scenarios like cryptographic key hijacking. However, there are some basic steps that concerned organizations should consider taking to help mitigate the risk of future side-channel attacks.

From the editors: More on virtualization security

Learn why you shouldn't scale back security efforts after completing the early phases of virtualization.

Struggling to remain PCI compliant in your cloud environment? We've got three steps you can take.

First, lock down operating system (OS) images and application instances as much as possible. While this won't necessarily prevent side-channel attacks, these steps can help prevent a compromise of any vectors that might grant an initial foothold in the environment. Second, dedicate time to tuning and collecting local process monitoring data and logs for cloud systems. In particular, closely evaluate any repeated access attempts to local memory and access from the system to any hypervisor processes or shared hardware cache. Aside from these steps, the only other way to partially or fully prevent these kinds of side-channel attacks is to code your applications, and even OS components (where possible) in such a way that they access shared resources like memory cache in a consistent, predictable way. This can prevent attackers from gleaning potentially harmful information, such as timing statistics and other behavioral attributes.

Discuss the potential risk

Side-channel attacks will likely continue to be discovered in shared-computing environments. For cloud users, this is a risk that has to be considered when performing sensitive workloads in the cloud. I recommend discussing these risks and potential countermeasures with your cloud providers. Even though it's highly unlikely such an attack could be successfully executed today, it's better to be prepared.

About the author:
Dave Shackleford is senior vice president of research and chief technology officer (CTO) at IANS; and a SANS analyst, instructor and course author. He has consulted with hundreds of organizations in the areas of security, regulatory compliance, and network architecture and engineering. He is a VMware vExpert and has extensive experience designing and configuring secure virtualized infrastructures. He has previously worked as chief security officer for Configuresoft; CTO for the Center for Internet Security; and as a security architect, analyst and manager for several Fortune 500 companies. Dave is the author of the Sybex book Virtualization Security: Protecting Virtualized Environments, and he recently co-authored the first published course on virtualization security for the SANS Institute. He currently serves on the board of directors at the SANS Technology Institute and helps lead the Atlanta chapter of the Cloud Security Alliance.

Dig Deeper on Cloud Computing Virtualization: Secure Multitenancy - Hypervisor Protection