The following discussion is meant to facilitate the understanding of side-channel attacks that affect today’s modern multicore processors. Side-channel attacks leverage the side effects of the execution of code. In this discussion, I will cover channels available through shared hardware devices such as processors, hard disk controllers or shared physical memory. Specifically, our focus will be on side channels in the last-level shared cache of Intel CPUs.

Types of Side-Channel Attacks

There are several types of side-channel attacks. One type that has received popular coverage is based on a technique called differential power analysis. This technique is a statistical method through which a black-box analysis of an unknown cryptographic hardware device can be used to discover secrets and intermediate cryptographic values via their power consumption. However, there are several other side-channel attacks that rely upon some knowledge of the system under test.

This is not as limiting as it might seem. For example, microprocessor specifications are available through the Hardware Reference documentation available from most manufacturers. I will discuss these side-channel attacks, which exploit knowledge of the underlying architecture in order to leak secrets from a virtual machine (VM) located on a CPU to another VM located on that same CPU. Note that this does not mean the same core, but rather the same processor package.

This scenario often arises in cloud computing when physical resources are shared among customers, called tenants. The storage technique is common on clouds because it allows the provider to use its physical resources in the most efficient manner possible.

Infrastructure-as-a-Service Clouds and Others

Infrastructure-as-a-service (IaaS) clouds offer scalability of servers or other resources based upon the demand from the tenant. To respond to these demands, the cloud provider will launch VMs on its compute nodes, or physical computers. These VMs can either be on the same compute node or they could be geographically separated onto different compute nodes. In order to protect one tenant’s resources from another on the same compute node, cloud providers rely upon the virtual machine monitor (VMM), or hypervisor. The VMM is responsible for protecting each tenant from exposure, whether accidentally or intentionally, to other tenants on the same compute node. It is this logical isolation that would be defeated via side-channel attacks.

There are other types of clouds, as well. Platform-as-a-service (PaaS) clouds are generally Web servers or other hosted servers that allow users to share common binaries and environments. Everyone has access to the same software, and the isolation is generally performed through Linux containers rather than full VMs. They also share the same kernel, as well as all the write-protected shared memory pages, so that pages do not have to be duplicated from one container to the next. For example, they share the same libc for Unix. The PaaS attack uses a strike against the shared last-level CPU cache but exploits this deduplication.

Attacks Against Services

The attacks against IaaS clouds, which use VMs for isolation, are by necessity more complex because one must find shared resources across VMs. In these attacks, the shared resource will be the CPU’s last-level cache, which is shared across VMs as well as CPU cores. Note that while PaaS attacks also use this feature, attacks against IaaS must be more sophisticated.

The first attack against the IaaS clouds is the same attack used against PaaS clouds. But, as I will describe, it is much more complex in the IaaS case; in fact, it’s often impossible. PaaS attacks, on the other hand, makes this attack trivially simple when Linux containers are used.

The attacks below assume that there is at least one (but usually several) attacker VMs controlled by the adversary, and at least one (but usually more) target VMs belonging to the cloud tenant under attack. In order for the attacks to succeed, the adversary must have at least one VM located on the same compute node and physical CPU (not the same core, but the same processor package) as the target. Note that this has been demonstrated to be possible in 40 percent of the experimental trials conducted. In these trials, the experimenters used a covert channel to identify whether they were a co-resident on the same machine, but this could be done by means of OS fingerprinting, network probes and even the side channel itself by stimulating a behavior in a target and searching for telltale signs of the activity, such as timing variations in code execution.

Because of this, some commercial cloud providers are offering guarantees that one tenant will be allocated a set of resources to themselves, not shared by another tenant.

Once co-residency has been achieved between an attacker VM and a target VM, there are several side channels that may be employed by the attacker to obtain information from the target. The most successful have been based on the CPU’s cache. Multiple cores can complicate this attack since each core has its own cache. However, in Intel CPUs the cores share what is called the last-level cache (LLC). The LLC is much larger than the caches on the cores themselves. This complicates attacks, as does its slower speed.

Stay Tuned…

I will discuss three attacks aimed at multicore CPUs, which are finely grained enough to discover cryptographic secrets. Given this resolution, other secrets are certainly possible to obtain, but cryptographic secrets such as private keys are often the best protected and most sensitive secrets in the target VM. Once again, any secret on your cloud instance can be obtained if the conditions are right. These side-channel attacks can exploit any execution timings to obtain any secret that your cloud VM processes.

Find out how your secrets on the cloud could be leaked to an attacker in Parts II and III of this series. Part II reviews attacks against El Gamal and RSA encryption in more depth, while Part III covers the attack that can recover an AES key in two minutes.

More from Cloud Security

How I got started: Cloud security engineer

3 min read - In today’s increasingly cloud-focused business environment, cloud security engineers are pivotal in protecting an organization’s critical data and infrastructure. As experts in cloud security, they leverage their expertise to ensure that the ever-expanding amount of cloud data is safe from emerging threats and vulnerabilities. Cloud security professionals combine their passion for technology with a deep understanding of security principles to design and implement robust cloud security strategies. What experience do these security experts have, and what led them to the…

“Authorized” to break in: Adversaries use valid credentials to compromise cloud environments

4 min read - Overprivileged plaintext credentials left on display in 33% of X-Force adversary simulations Adversaries are constantly seeking to improve their productivity margins, but new data from IBM X-Force suggests they aren’t exclusively leaning on sophistication to do so. Simple yet reliable tactics that offer ease of use and often direct access to privileged environments are still heavily relied upon. Today X-Force released the 2023 Cloud Threat Landscape Report, detailing common trends and top threats observed against cloud environments over the past…

Lessons learned from the Microsoft Cloud breach

3 min read - In early July, the news broke that threat actors in China used a Microsoft security flaw to execute highly targeted and sophisticated espionage against dozens of entities. Victims included the U.S. Commerce Secretary, several U.S. State Department officials and other organizations not yet publicly named. Officials and researchers alike are concerned that Microsoft products were again used to pull off an intelligence coup, such as during the SolarWinds incident. In the wake of the breach, the Department of Homeland Security…

What you need to know about protecting your data across the hybrid cloud

6 min read - The adoption of hybrid cloud environments driving business operations has become an ever-increasing trend for organizations. The hybrid cloud combines the best of both worlds, offering the flexibility of public cloud services and the security of private on-premises infrastructure. We also see an explosion of SaaS platforms and applications, such as Salesforce or Slack, where users input data, send and download files and access data stored with cloud providers. However, with this fusion of cloud resources, the risk of data…