Papers
Topics
Authors
Recent
Search
2000 character limit reached

Malware Guard Extension: Using SGX to Conceal Cache Attacks

Published 28 Feb 2017 in cs.CR | (1702.08719v3)

Abstract: In modern computer systems, user processes are isolated from each other by the operating system and the hardware. Additionally, in a cloud scenario it is crucial that the hypervisor isolates tenants from other tenants that are co-located on the same physical machine. However, the hypervisor does not protect tenants against the cloud provider and thus the supplied operating system and hardware. Intel SGX provides a mechanism that addresses this scenario. It aims at protecting user-level software from attacks from other processes, the operating system, and even physical attackers. In this paper, we demonstrate fine-grained software-based side-channel attacks from a malicious SGX enclave targeting co-located enclaves. Our attack is the first malware running on real SGX hardware, abusing SGX protection features to conceal itself. Furthermore, we demonstrate our attack both in a native environment and across multiple Docker containers. We perform a Prime+Probe cache side-channel attack on a co-located SGX enclave running an up-to-date RSA implementation that uses a constant-time multiplication primitive. The attack works although in SGX enclaves there are no timers, no large pages, no physical addresses, and no shared memory. In a semi-synchronous attack, we extract 96% of an RSA private key from a single trace. We extract the full RSA private key in an automated attack from 11 traces within 5 minutes.

Citations (416)

Summary

  • The paper demonstrates a Prime+probe cache attack within SGX enclaves, successfully extracting cryptographic keys from neighboring enclaves using real hardware tests.
  • It introduces a novel high-resolution timing mechanism via a counting thread that outperforms native timers, indicating that traditional countermeasures may be insufficient.
  • The study combines DRAM and cache side-channels to recover physical address bits without large pages, urging a reevaluation of SGX security paradigms and cloud protections.

An Analysis of Malware Guard Extensions: Using SGX to Conceal Cache Attacks

The paper "Malware Guard Extension: Using SGX to Conceal Cache Attacks" authored by Schwarz et al. presents a sophisticated exploration into the application of Intel’s Software Guard Extensions (SGX) for the execution of side-channel cache attacks. The research delineates the potential risks posed by SGX in fostering concealed malware, which exploits SGX’s protection mechanisms to perform cache attacks on co-located enclaves. This study is notably significant for researchers and practitioners focusing on enclave technologies, cloud security, and side-channel attack mitigation.

Overview and Contributions

The authors provide a comprehensive exposition on the operational mechanics of SGX and its role in isolating user-level software. While SGX is designed to protect against various attacks, it paradoxically introduces avenues for novel threats, particularly via cache-based side-channel attacks. This research is pioneering, being the first to showcase malware functioning seamlessly on real SGX hardware to execute such attacks.

Key contributions discussed in the paper include:

  • Demonstrating Cache Attacks within SGX: The study operationalizes a Prime+ probe attack within an SGX enclave, illustrating the retrieval of cryptographic keys from neighboring enclaves. Notably, this was achieved without the customary prerequisites necessary for typical side-channel exploits (e.g., access to timers or large pages), thus challenging prior assumptions regarding enclave security.
  • Innovative Timing Mechanism: A novel high-resolution timing mechanism was crafted using a counting thread, surpassing the native timestamp counter in resolution. This method underlines that restricting high-resolution timers, a common countermeasure, is insufficient in thwarting cache attacks.
  • Physical Address Bit Recovery Approach: An integrated approach combining DRAM and cache side-channels was utilized to deduce physical address bits absent of large page support, through recovering physical address bits of contiguous enclave memory.

Experimental Findings

The paper meticulously details the experimental setup and evaluations that underscore the potency of the described attacks. By targeting the RSA implementation in mbedTLS, the researchers demonstrate their method’s effectiveness. They achieved a significant milestone: extracting 96% of a 4096-bit RSA private key from a single trace and full recovery from 11 traces within 5 minutes. These results articulate the substantial threat posed by unmanaged enclave operations and underline the urgency for more robust countermeasures.

Implications

The implications of this research are multifacetal.

  • Security Paradigms in SGX: The study strongly suggests a reevaluation of current security paradigms associated with SGX enclaves. The capacity to perform undetectable side-channel attacks using SGX leverages enclave protection features intended to safeguard applications.
  • Implications for Cloud Security: Given the feasibility of these attacks in virtualized environments with containerized applications, cloud services using SGX are critically examined. The findings indicate the necessity for cloud providers to adopt additional protective measures beyond default enclave protections to ensure tenant data integrity.
  • Guide for Future Hardware Design: The research offers valuable insights into hardware design, advocating for nuanced improvements in future SGX iterations and suggesting practical countermeasures at various levels, from software to hardware.

Speculative Developments

Looking forward, advancements in AI and machine learning could potentially enhance the detection capabilities of such stealthy malware. Machine learning-based systems trained on sophisticated threat models might provide adaptive anomaly detection that can counteract such hidden threats in real-time. Moreover, continuous development in hardware isolation features might provide additional layers of defense against the demonstrated vulnerabilities.

Conclusion

Schwarz et al. have adeptly expanded the discourse on enclave technology vulnerabilities. Their findings shed light on fundamental issues in SGX’s underlying assumptions about security and present an indispensable reference point for both the development of future secure computing technologies and the broader understanding of side-channel attacks. Researchers and developers in the realms of information security, hardware design, and cloud infrastructure would benefit significantly from considering the implications of this study in their ongoing work.

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.