Intel® Software Guard Extensions (Intel® SGX)

Slides:



Advertisements
Similar presentations
Confidential 1 Phoenix Security Architecture and DevID July 2005 Karen Zelenko Phoenix Technologies.
Advertisements

Thomas S. Messerges, Ezzat A. Dabbish Motorola Labs Shin Seung Uk.
1 Hardware Support for Isolation Krste Asanovic U.C. Berkeley MURI “DHOSA” Site Visit April 28, 2011.
Vpn-info.com.
Copyright © 2005 David M. Wheeler, All Rights Reserved Desert Code Camp: Introduction to Cryptography David M. Wheeler May 6 th 2006 Phoenix, Arizona.
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
1 Implementing an Untrusted Operating System on Trusted Hardware David Lie Chandramohan A. Thekkath Mark Horowitz University of Toronto, Microsoft Research,
1 SECURE-PARTIAL RECONFIGURATION OF FPGAs MSc.Fisnik KRAJA Computer Engineering Department, Faculty Of Information Technology, Polytechnic University of.
Implementing an Untrusted Operating System on Trusted Hardware.
1 GP Confidential © GlobalPlatform’s Value Proposition for Mobile Point of Sale (mPOS)
Shielding Applications from an Untrusted Cloud Andrew Baumann, Marcus Peinado, and Galen Hunt. OSDI Fall 2014 Presenter: Kun Sun, Ph.D. Most slides.
Information Security 1 Information Security: Security Tools Jeffy Mwakalinga.
1 Minimal TCB Code Execution Jonathan McCune, Bryan Parno, Adrian Perrig, Michael Reiter, and Arvind Seshadri Carnegie Mellon University May 22, 2007.
Government Online – White Paper Companion – Copyright © 2007 Credentica Inc. All Rights Reserved. This presentation is animated. Press the “space bar”
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE USC CSci599 Trusted Computing Lecture Three.
Chapter 12 File Management Systems
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Course 201 – Administration, Content Inspection and SSL VPN
Computer Security Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
Computer Organization
Session Agenda Designed to address BIOS Limitations Needed for the larger server platforms (Intel-HP Itanium) First called Intel Boot Initiative.
Trusted Computing BY: Sam Ranjbari Billy J. Garcia.
Week #7 Objectives: Secure Windows 7 Desktop
Kenichi Kourai (Kyushu Institute of Technology) Takuya Nagata (Kyushu Institute of Technology) A Secure Framework for Monitoring Operating Systems Using.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Solutions for Secure and Trustworthy Authentication Ramesh Kesanupalli
Architecture for Protecting Critical Secrets in Microprocessors Ruby Lee Peter Kwan Patrick McGregor Jeffrey Dwoskin Zhenghong Wang Princeton Architecture.
An approach to on the fly activation and deactivation of virtualization-based security systems Denis Efremov Pavel Iakovenko
1 Architectural Support for Copy and Tamper Resistant Software David Lie, Chandu Thekkath, Mark Mitchell, Patrick Lincoln, Dan Boneh, John Mitchell and.
Trusted Computing Or How I Learned to Stop Worrying and Love the MPAA.
Firmware Storage : Technical Overview Copyright © Intel Corporation Intel Corporation Software and Services Group.
Kerberos Named after a mythological three-headed dog that guards the underworld of Hades, Kerberos is a network authentication protocol that was designed.
Compatibility and Interoperability Requirements
Seongmin Kim Youjung Shin Jaehyung Ha
Operating Systems Security
Security fundamentals Topic 5 Using a Public Key Infrastructure.
Wireless and Mobile Security
Trusted Computing and the Trusted Platform Module Bruce Maggs (with some slides from Bryan Parno)
Full and Para Virtualization
Chapter 40 Network Security (Access Control, Encryption, Firewalls)
1 Virtual Memory (I). 2 Outline Physical and Virtual Addressing Address Spaces VM as a Tool for Caching VM as a Tool for Memory Management VM as a Tool.
VMM Based Rootkit Detection on Android
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Unit 2 Personal Cyber Security and Social Engineering Part 2.
Trusted? 05/4/2016 Charles Sheehe, CCSDS Security Working Group GRC POC All information covered is from public sources.
Hardware-rooted Trust for Secure Key Management & Transient Trust
Trusted Computing and the Trusted Platform Module
EnGarde: Mutually Trusted Inspection of SGX Enclaves
Trusted Computing and the Trusted Platform Module
Outline What does the OS protect? Authentication for operating systems
Outline What does the OS protect? Authentication for operating systems
Device Guard: AppLocker on steroids
TERRA Authored by: Garfinkel, Pfaff, Chow, Rosenblum, and Boneh
Building hardware-based security with a Trusted Platform Module (TPM)
TPM, TEE, SGX Technologies
User-mode Secret Protection (SP) architecture
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
Sai Krishna Deepak Maram, CS 6410
SCONE: Secure Linux Containers Environments with Intel SGX
Intel Active Management Technology
Shielding applications from an untrusted cloud with Haven
Aimee Coughlin, Greg Cusack, Jack Wampler, Eric Keller, Eric Wustrow
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Bruce Maggs (with some slides from Bryan Parno)
Bruce Maggs (with some slides from Bryan Parno)
Stefano Tempesta Secure Machine Learning with SQL Server Always Encrypted with Secure Enclaves.
Presentation transcript:

Intel® Software Guard Extensions (Intel® SGX) Dror Caspi Intel April 21, 2015 * Based on a presentation by Frank McKeen, Intel Labs Copyright © 2015 Intel Corporation. All rights reserved.

Legal Disclaimers The comments and statements are mine and not necessarily Intel’s Intel technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Learn more at intel.com, or from the OEM or retailer. No computer system can be absolutely secure. 

Outline Problem Statement Attack Surface and Overview Programming environment System programming view Day in the life of an enclave SGX Access Control & Off Chip protections Attestation and Sealing Developing with SGX Summary

The Basic Issue: Why Aren’t Compute Devices Trustworthy? Protected Mode (rings) protects OS from apps … App App Malicious App X X X Info Attack Bad Code Bad Code OK Privileged Code Privileged Code attack Rings worked well before the internet Platform owner and app developers were aligned Code was not downloaded from unknown sources Need additional protection from unknown sources which are not aligned with the platform owner on program behavior … and apps from each other … … UNTIL a malicious app exploits a flaw to gain full privileges and then tampers with the OS or other apps Apps not protected from privileged code attacks

Scalable security within mainstream environment Reduced attack surface with SGX Application gains ability to defend its own secrets Smallest attack surface (app + processor) Malware that subverts OS/VMM, BIOS, Drivers etc. cannot steal app secrets Familiar development/debug Single application environment Build on existing ecosystem expertise Familiar deployment model Platform integration not a bottleneck to deployment of trusted apps Attack surface with Enclaves Attack surface today App Proxy App Proxy App Proxy X X OS VMM (Hypervisor) Hardware Reference talk on applications for development environment Attack Surface Scalable security within mainstream environment

SGX Programming Environment Trusted execution environment embedded in a process OS With its own code and data Enclave Code Provide Confidentiality Enclave Data Provide integrity Enclave Enclave With controlled entry points App Data TCS (*n) TCS (*n) Supporting multiple threads TCS (*n) App Code With full access to app memory User Process Enclave 6

SGX High-level HW/SW Picture Enclave Enclave Instructions EEXIT EGETKEY EREPORT EENTER ERESUME Application Environment SGX User Runtime SGX User Runtime Instructions ECREATE EADD EEXTEND EINIT EBLOCK ETRACK EWB ELD EPA EREMOVE Privileged Environment SGX Module Page Tables Platform Exposed Hardware Hdw Data Structure Hardware EPC EPCM Runtime Application OS Data structure 7 7

Life Cycle of An Enclave Build Life Cycle of An Enclave Virtual Addr Space Physical Addr Space System Memory Plaintext Code/Data Load Code/Data Plaintext Code/Data Code/Data Code/Data Code/Data Code/Data MRENCLAVE MRENCLAVE Update PTE Enclave Page Cache (EPC) EPCM ECREATE (Range) ECREATE (Range) Invalid EADD (Copy Page) EADD (Copy Page) EEXTEND EEXTEND Plaintext Code/Data Plaintext Code/Data Valid,ID, LA Invalid EINIT EINIT Plaintext Code/Data Valid,ID, LA Invalid EENTER EENTER Plaintext Code/Data EEXIT EEXIT EREMOVE EREMOVE SECS Invalid Valid,SECS 8

Traditional IA Page Table Replace Address With Abort SGX Access Control Non-Enclave Access Linear Address Physical Address Traditional IA Page Table Checks Enclave Access? No Address in EPC? Enclave Access Yes Yes Address in EPC? Replace Address With Abort Page No No Yes Signal Fault Check EPCM Checks Pass ? Yes Allow Memory Access No

Protection vs. Memory Snooping Attacks Non-Enclave Access CPU Package CPU Package Security perimeter is the CPU package boundary Data and code unencrypted inside CPU package Data and code outside CPU package is encrypted and/or integrity checked External memory reads and bus snoops see only encrypted data System Memory Cores Cache Jco3lks937weu0cwejpoi9987v80we Snoop AMEX: 3234-134584-26864 Snoop

Outline Problem Statement Attack Surface and Overview Programming environment System programming view Day in the life of an enclave SGX Access Control & Off Chip protections Attestation and Sealing Developing with SGX Summary

The Challenge: Provisioning Secrets to the Enclave An enclave is in the clear before instantiation Sections of code and data could be encrypted, but their decryption key can’t be pre-installed Secrets come from outside the enclave Keys Passwords Sensitive data The enclave must be able to convince a 3rd party that it’s trustworthy and can be provisioned with the secrets Subsequent runs should be able to use the secrets that have already been provisioned

Trustworthiness A service provider should vet the enclave’s Trusted Computing Base (TCB) before it should trust it and provide secrets to it The enclave’s software The CPU’s hardware & firmware Intel® SGX provides the means for an enclave to securely prove to a 3rd party: What software is running inside the enclave Which execution environment the enclave is running at Which Sealing Identity will be used by the enclave What’s the CPU’s security level

Attestation: Software TCB When building an enclave, Intel® SGX generates a cryptographic log of all the build activities Content: Code, Data, Stack, Heap Location of each page within the enclave Security flags being used MRENCLAVE (“Enclave Identity”) is a 256-bit digest of the log Represents the enclave’s software TCB A software TCB verifier should: Securely obtain the enclave’s software TCB Securely obtain the expected enclave’s software TCB Compare the two values

Local Attestation “Local attestation”: The process by which one enclave attests its TCB to another enclave on the same platform Using Intel® SGX’s EREPORT and EGETKEY instructions EREPORT generates a cryptographic REPORT that binds MRENCLAVE to the target enclave’s REPORT KEY EGETKEY provides the REPORT KEY to verify the REPORT TCB component Attestation CPU Firmware & hardware Symmetric - CPU REPORT KEY Software MRENCLAVE

Local Attestation - Flow Processor Client Application Client Application Reporting Enclave Verifying Enclave  MRENCLAVE REPORT MAC EGETKEY EREPORT MRENCLAVE Verifying enclave sends its MRENCLAVE to reporting enclave Reporting enclave creates a cryptographic REPORT that includes its MRENCLAVE Verifying enclave obtains its REPORT key and verifies the authenticity of the REPORT

Remote Attestation “Remote attestation”: The process by which one enclave attests its TCB to another entity outside of the platform Intel® SGX Extends Local attestation by allowing a Quoting Enclave (QE) to use Intel® EPID to create a QUOTE out of a REPORT Intel® EPID is a group signature scheme TCB component Attestation CPU Firmware & hardware Asymmetric - Intel® EPID Software MRENCLAVE

Remote Attestation - Flow Platform Remote Platform  Verifying Application  Enclave QUOTE REPORT Quoting Enclave MRENCLAVE EPID MAC Verifying enclave becomes the Quoting Enclave (QE). After verifying the REPORT the, QE signs the REPORT with the EPID private key and converts it into a QUOTE Remote platform verifies the QUOTE with the EPID public key and verifies MRENCLAVE against the expected value

Sealing Authority Every enclave has an Enclave Certificate (SIGSTRUCT) which is signed by a Sealing Authority Typically the enclave writer SIGSTRUCT includes: Enclave’s Identity (represented by MRENCLAVE) Sealing Authority’s public key (represented by MRSIGNER) EINIT verifies the signature over SIGSTRUCT prior to enclave initialization

Sealing “Sealing”: Cryptographically protecting data when it leaves the enclave. Enclaves use EGETKEY to retrieve an enclave, platform persistent key and encrypts the data EGETKEY uses a combination of enclave attributes and platform unique key to generate keys Enclave Sealing Authority Enclave Product ID Enclave Product Security Version Number (SVN)

Example: Secure Transaction Remote Platform Client Application 1 Enclave QE EPID  2 3 4 Enclave built & measured against ISV’s signed certificate Enclave calls EREPORT to obtain a REPORT that includes enclave specific data (ephemeral key) REPORT & user data sent to Quoting Enclave who signs the REPORT with an EPID private key QUOTE sent to server & verified Ephemeral key used to create a trusted channel between enclave and remote server Secret provisioned to enclave Enclave calls EGETKEY to obtain the SEAL KEY Secret is encrypted using SEAL KEY & stored for future use

Example: Secure Transaction Remote Platform Client Application 1 Enclave QE 5 Authenticated Channel EPID  2 4 3 Enclave built & measured against ISV’s signed certificate Enclave calls EREPORT to obtain a REPORT that includes enclave specific data (ephemeral key) REPORT & user data sent to Quoting Enclave who signs the REPORT with an EPID private key QUOTE sent to server & verified Ephemeral key used to create a trusted channel between enclave and remote server Secret provisioned to enclave Enclave calls EGETKEY to obtain the SEAL KEY Secret is encrypted using SEAL KEY & stored for future use

Authenticated Channel Example: Secure Transaction Remote Platform Client Application 1 Enclave 5 6 Authenticated Channel 5 4 2 3 Enclave built & measured against ISV’s signed certificate Enclave calls EREPORT to obtain a REPORT that includes enclave specific data (ephemeral key) REPORT & user data sent to Quoting Enclave who signs the REPORT with an EPID private key QUOTE sent to server & verified Ephemeral key used to create a trusted channel between enclave and remote server Secret provisioned to enclave Enclave calls EGETKEY to obtain the SEAL KEY Secret is encrypted using SEAL KEY & stored for future use

Authenticated Channel Example: Secure Transaction Remote Platform Client Application 1 Enclave 5 Authenticated Channel 5 7 4 2 6 3 Enclave built & measured against ISV’s signed certificate Enclave calls EREPORT to obtain a REPORT that includes enclave specific data (ephemeral key) REPORT & user data sent to Quoting Enclave who signs the REPORT with an EPID private key QUOTE sent to server & verified Ephemeral key used to create a trusted channel between enclave and remote server Secret provisioned to enclave Enclave calls EGETKEY to obtain the SEAL KEY Secret is encrypted using SEAL KEY & stored for future use 8

Intel® SGX Software Development SGX SDK Tools Trusted Application Software Developer decides which components should execute within an enclave Development Environment allows the Developer to quickly develop enclave enabled binaries Including support for common software libraries, exporting interfaces, and support for provisioning Windows DLL / Enclave App Code Processing Component SGX SDK Libraries Glue Code Glue Code SGX SDK Libraries Processing Component Architectural Enclaves Architectural Enclaves Architectural Enclaves Intel SGX enabled CPU

SGX Technical Summary Provides any application the ability to keep a secret Provide capability using new processor instructions Application can support multiple enclaves Provides integrity and confidentiality Resists hardware attacks Prevent software access, including privileged software and SMM Applications run within OS environment Low learning curve for application developers Open to all developers Resources managed by system software How do you sell a minimum TCB? Provide provable/dependable integrity & confidentiality

Links Intel’s SGX Page (Programming Reference, white papers & blogs): https://software.intel.com/en-us/isa-extensions/intel-sgx Joint research poster session: http://sigops.org/sosp/sosp13/ Public Cloud Paper using SGX2: https://www.usenix.org/sites/default/files/osdi14_full_proceedings.pdf HASP Workshop: https://sites.google.com/site/haspworkshop2013/workshop-program ISCA 2015 Tutorial: http://sgxisca.weebly.com/

Thank You

Backup

SGX Paging Introduction Requirement: Remove an EPC page and place into unprotected memory. Later restore it. Page must maintain same security properties (confidentiality, anti- replay, and integrity) when restored Instructions: EWB: Evict EPC page to main memory with cryptographic protections ELDB/ELDU: Load page from main memory to EPC with cryptographic protections EPA: Allocate an EPC page for holding versions EBLOCK: Declare an EPC page ready for eviction ETRACK: Ensure address translations have been cleared

Page-out Example EWB Parameters: EWB Operation BUILD Page-out Example EWB EPC System Memory EWB Parameters: Pointer to EPC page that needs to be paged out Pointer to empty version slot Pointers outside EPC location EWB Operation Remove page from the EPC Populate version slot Write encrypted version to outside Write meta-data, PCMD All pages, including SECS and Version Array can be paged out SECS Enclave Page VER VA Page Enclave Page Encrypted Page PCMD Enclave Page

Page-in Example ELD Parameters: ELD Operation Encrypted page BUILD Page-in Example ELD EPC System Memory ELD Parameters: Encrypted page Free EPC page SECS (for an enclave page) Populated version slot ELD Operation Verify and decrypt the page using version Populate the EPC slot Make back-pointer connection (if applicable) Free-up version slot SECS Enclave Page VA Page VER Encrypted Page Free Enclave Page Enclave Page MD Enclave Page