Hardware enclaves – the next frontier of enterprise application security

(Pixabay)

A fundamental maxim of computer security is that data should be protected at rest and in transit. The rule is usually translated into security processes that require encrypted network connections, such as TLS, VPN, and encryption of storage volumes, files, and objects.

Unfortunately, the bilateral principle has a small but perilous blind spot: data in use. Although encrypted storage and network sessions protect data in most cases, the use of shared infrastructure and services such as cloud instances and containers opens applications and data to attacks while they are running. Much like stealth malware or a rogue application that extracts data from other applications on an infected PC, it is possible for malicious code on a shared system to sniff data from another application’s working memory while it is running. execution. Moreover, since the data must be decrypted during the execution of the code, it does not matter how securely it was treated during storage or transport.

There have been many recent attempts to tighten the security barrier around running applications, including micro-VMs, application firewalls with role-based access security (RBAC), and curated app registries, but none are foolproof. Instead, the only way to ensure data security while running the application is to leverage the hardware features now included in modern processors. Unfortunately, using such Trusted Execution Environments (TEEs) is easier said than done, a problem that startups and industry giants are solving in hopes of making so-called computing confidentiality a standard feature of cloud environments.

Hardware sandboxes – what started on phones comes to the cloud

A TEE is built on top of a hardware-defined secure enclave, which can be part of a processor or a separate chip, enhancing application security by encrypting the data used and applying access controls on different memory regions . Collectively, these create a so-called application sandbox that isolates an application’s data from all other processes running on the system. Application sandboxing is not a new concept, for example, virtual machines implement a form of sandboxing in software, however, applying sandbox protections in hardware was popularized by Apple in 2013 when it incorporated a Secure Enclave (SEP) processor on the A7 SoC powering the iPhone 5S.

Apple has since extended Secure Enclaves across its entire product line by adding SEP hardware to its A-series (iPhone, iPad, Apple TV, HomePod), S-series (Watch) and T-series (microchip) silicon. Mac security). Thus, a feature originally designed to protect the phone’s operating system and a user’s biometric security data has been extended to provide robust isolation between applications. Google followed suit in 2018, first adding the Titan M security chip to the Pixel 3 and all subsequent Chrome phones and devices.

Apple has been vague in describing its SEP, the design and features of which often change with new revisions of the A-series SOC, however, this Blackhat presentation summarizes the details, which represents a reasonable proxy for SEPs that have subsequently been introduced by Intel and AMD.

  • Embedded in hardware that the application processor cannot access.
  • Modules for basic security functions, including an encryption engine and a random number generator.
  • Cryptographically signed and validated dedicated boot ROM and working RAM
  • Provides application-specific key validation and AES encryption of external RAM.
  • Applies memory segmentation, aka a “filter”, to prevent applications from accessing another application’s memory or SEP memory.

It may seem ironic that consumer devices were the pioneers of hardware security, because the stakes, i.e. the risks and consequences of a breach, are much higher for enterprises, especially those that use shared cloud services. Fortunately, the hardware protection gap began to close when Intel released its secure enclave and Security Guard Extensions (SGX) SDK in 2015 with the Skylake microarchitecture.

Unlike some TEE implementations, SGX allows an application to be partitioned into protected and unprotected modules.

(Intel White Paper: Intel WP: Enhanced Security Features for Applications and Data in Use)

An Intel product brief and a blog from Quarkslab, a security research and consulting firm, provide excellent summaries of SGX’s main features:

  • When an application creates an enclave, SGX creates protected memory.
  • Unprotected application code and data is separate from secure code and data in the enclave.
  • When the app calls an enclave function, only enclave code can see the protected data. External access is denied.
  • When a running enclave is terminated, the SEP removes all data from processor registers to prevent eavesdropping by other processes.
  • An application can use an SGX function to verify its authenticity and integrity and whether it is running on a genuine Intel processor from a trusted third party (or remote attestation).
(Intel White Paper: Intel WP: Enhanced Security Features for Applications and Data in Use)

AMD released a similar set of hardware security features in 2016 with Secure Memory Encryption (SME) and Secure Encrypted Virtualization (SEV). ARM followed suit by introducing a Platform Security Architecture (PSA) in 2017 which is currently embodied in Cortex-M processors and IP blocks available to ARM licensees.

Transform hardware features into secure applications

Although processor designers have provided the raw materials for creating hardware-enhanced secure applications, the software tools available are basic and hardware-specific. Thus, applications written for one security architecture (eg Intel SGX versus AMD SME) must be rewritten before migrating to another. What is needed is a platform-independent layer of abstraction to erase these architectural distinctions. It’s a technology gap that has caught the attention of several startups, including Anjuna, Anglave, and Fortanix, and sparked the creation of the Confidential Computing Consortium.

I recently spoke with Ayal Yogev, CEO and co-founder of Anjuna Security, about the company’s first product, Anjuna Enterprise Enclaves, an architecture-independent platform that acts as a middleman between implementations and applications. Hardware-specific SEPs. Thus, developers do not need to recompile applications for different types of servers or cloud services. The product currently runs on Intel or AMD servers or Azure services, with support for AWS Nitro coming soon, and is available through the Azure Marketplace.

(Anjuna Slide Tray.)

Azure has embraced the idea of ​​hardware-enhanced security through its confidential computing service and recently announced the general availability of virtual machines using SGX to protect data at runtime. Developers can build secure applications on Azure DCsv2 instances and have several options on the Azure Marketplace in addition to Anjuna, including:

IBM Cloud supports hardware security through IBM Cloud Data Shield, a secure enclave available for its Kubernetes service hosts that adds Python and Java interfaces to standard SGX C and C++ APIs, and includes pre-built SGX applications for MySQL and NGINX.

my catch

Secure hardware enclaves aren’t new, but extending the concept to enterprise applications and cloud infrastructure is a nascent development. While the Confidential Computing Consortium is only two years old, it now has more than two dozen members, including all major cloud providers except AWS.

Before confidential computing – what I call hardware-enhanced security – can be widely adopted, developers need platform-independent tools that accelerate the adaptation of existing applications to secure hardware and allow workloads to be migrated between server and cloud platforms without modification. Initial tools focused on security niches like key management, however, Anjuna offers the promise of a general-purpose abstraction layer that can bolster the security of many categories of applications, including data analytics. data, content management and DLP, blockchain and edge/IoT workloads.

Improving application security by exploiting the hardware features of modern processors will be a slow and tedious process, however, it should be remembered that it took Apple and iOS developers years to fully exploit the features of the A-series SEP. So CISOs and enterprise developers have time to climb the confidential computing learning curve, but have no excuse to delay now that cloud services and supporting development platforms have arrived. on the market.