opensgx an open platform for
play

OpenSGX: An Open Platform for SGX Research Prerit Jain, Soham Desai, - PowerPoint PPT Presentation

OpenSGX: An Open Platform for SGX Research Prerit Jain, Soham Desai, Seongmin Kim* , Ming-Wei Shih, JaeHyuk Lee, Changho Choi, Youjung Shin, Taesoo Kim, Brent Byunghoon Kang, Dongsu Han 1 Trusted Execution Environment (TEE) Hardware


  1. OpenSGX: An Open Platform for SGX Research Prerit Jain, Soham Desai, Seongmin Kim* , Ming-Wei Shih, JaeHyuk Lee, Changho Choi, Youjung Shin, Taesoo Kim, Brent Byunghoon Kang, Dongsu Han 1

  2. Trusted Execution Environment (TEE) • Hardware technologies for trusted computing – Isolated execution: integrity of code, confidentiality – To protect application from untrusted platform 2

  3. Trusted Execution Environment (TEE) • Hardware technologies for trusted computing – Isolated execution: integrity of code, confidentiality – To protect application from untrusted platform 3

  4. Trusted Execution Environment (TEE) • Hardware technologies for trusted computing – Isolated execution: integrity of code, confidentiality – To protect application from untrusted platform 4

  5. Trusted Execution Environment (TEE) • Hardware technologies for trusted computing – Isolated execution: integrity of code, confidentiality – To protect application from untrusted platform 5

  6. Trusted Execution Environment (TEE) • Hardware technologies for trusted computing – Isolated execution: integrity of code, confidentiality – To protect application from untrusted platform • Practical limitations of TEEs – Trusted Platform Module (TPM) : Poor performance – ARM TrustZone : Compatibility (only for embedded devices) 6

  7. Intel SGX • An extension of x86 Instruction Set Architecture (ISA) – Offers native performance, Compatibility with x86 – Application keeps its data/code inside the “ enclave ” Enclave Application (untrusted) Operating System (untrusted) Skylake CPU 7

  8. Intel SGX • An extension of x86 Instruction Set Architecture (ISA) – Offers native performance, Compatibility with x86 – Application keeps its data/code inside the “ enclave ” Data Code Enclave Application (untrusted) Operating System (untrusted) Skylake CPU 8

  9. Intel SGX 101: Isolated Execution • Smallest attack surface by reducing TCB (App + processor) • Protect app’s secret from untrusted privilege software Physical Address Memory Space CPU Package Enclave EPC Encrypted code/data 9

  10. Intel SGX 101: Isolated Execution • Smallest attack surface by reducing TCB (App + processor) • Protect app’s secret from untrusted privilege software Physical Address Memory Space CPU Package Enclave EPC Encrypted code/data Memory Encryption Engine (MEE) 10

  11. Intel SGX 101: Isolated Execution • Smallest attack surface by reducing TCB (App + processor) • Protect app’s secret from untrusted privilege software Physical Address Memory Space CPU Package Enclave EPC Encrypted code/data Memory Encryption Engine (MEE) 11

  12. Intel SGX 101: Isolated Execution • Smallest attack surface by reducing TCB (App + processor) • Protect app’s secret from untrusted privilege software Physical Address Memory Space CPU Package Enclave Processor Key EPC Encrypted code/data Memory Encryption Engine (MEE) 12

  13. Intel SGX 101: Isolated Execution • Smallest attack surface by reducing TCB (App + processor) • Protect app’s secret from untrusted privilege software Physical Address Memory Space CPU Package Enclave Processor Key EPC Encrypted Snooping code/data Memory Encryption Engine (MEE) 13

  14. Intel SGX 101: Isolated Execution • Smallest attack surface by reducing TCB (App + processor) • Protect app’s secret from untrusted privilege software Physical Address Memory Space CPU Package Enclave Processor Key EPC Access from Encrypted Snooping OS/VMM code/data Memory Encryption Engine (MEE) 14

  15. Intel SGX 101: Remote attestation • Attest an application on remote platform – Check the integrity of enclave (hash of code/data pages) – Verify whether enclave is running on real SGX CPU – Can establish a “ secure channel ” between enclaves User platform Remote platform 1. Request Application Challenger Enclave Application Enclave 4. Send Ephemeral QUOTE 2. Create REPORT 5. Verify 3. Sign with Quoting Attestation EPID group key Enclave Verification (Create QUOTE) EPID key 15 15

  16. Intel SGX 101: Remote attestation • Attest an application on remote platform – Check the integrity of enclave (hash of code/data pages) – Verify whether enclave is running on real SGX CPU – Can establish a “ secure channel ” between enclaves User platform Remote platform Intel SGX brings new opportunities for 1. Request Application enhancing security of applications Challenger Enclave Application Enclave 4. Send Ephemeral QUOTE 2. Create REPORT 5. Verify 3. Sign with Quoting Attestation EPID group key Enclave Verification (Create QUOTE) EPID key 16 16

  17. SGX Research: Current Status • Pioneering research: Adopting SGX on cloud computing (Haven [OSDI14], VC3 [S&P15]) • Confidentiality verification of SGX program (Moat [CCS15]) • Adopts SGX on networking [HotNets15] 17

  18. SGX Research: Current Status • However, software technologies for SGX lag behind their hardware counterpart SGX CPU and SDK is now available! But.. • Specification for SGX [revision 1 & 2] is not fully available on the SGX hardware (only functionalities in revision 1) • SGX technology has a complex license model 18

  19. OpenSGX: Design Goal • Offers a complete platform for SGX research – To explore software and hardware design space of SGX – To develop and evaluate SGX-enabled applications 19

  20. OpenSGX: Design Goal • Offers a complete platform for SGX research – To explore software and hardware design space of SGX – To develop and evaluate SGX-enabled applications • Fills non-trivial issues on SGX software components – Support for system software and user-level APIs – Familiar programming model and interface – Secure design to defend against potential attack vectors (e.g., Iago attacks) 20

  21. OpenSGX: Design Goal • Offers a complete platform for SGX research – To explore software and hardware design space of SGX – To develop and evaluate SGX-enabled applications • Fills non-trivial issues on SGX software components – Support for system software and user-level APIs – Familiar programming model and interface – Secure design to defend against potential attack vectors (e.g., Iago attacks) • Non goal : security guarantee 21

  22. OpenSGX: Approach • Using userspace emulation of QEMU – Binary translation to support SGX instructions – QEMU helper routine to implement complex instructions Host (single address space) QEMU Entry point EPC Code RIP Lib EPC Binary enclu(){ … Helper routine … … Translation EPC Data asm (“.byte 0x0f ” if(opcode == - Set registers “.byte 0x01 ” … 0x0f01d7) { “.byte 0xd7 ” - Operates “ rax =entry” Stack EPC helper_enclu(); SGX instructions … } EPC } Heap … Enclave Wrapper 22

  23. OpenSGX: Approach • Using userspace emulation of QEMU – Binary translation to support SGX instructions – QEMU helper routine to implement complex instructions Host (single address space) QEMU Entry point EPC Code RIP Lib EPC Binary enclu(){ … Helper routine … … Translation EPC Data asm (“.byte 0x0f ” if(opcode == - Set registers “.byte 0x01 ” … 0x0f01d7) { “.byte 0xd7 ” - Operates “ rax =entry” Stack EPC helper_enclu(); SGX instructions … } EPC } Heap … Enclave Wrapper 23

  24. OpenSGX: Component Overview • Emulated SGX hardware SGX QEMU (HW emulation) 24

  25. OpenSGX: Component Overview • Emulated SGX hardware • OS emulation layer SGX OS Emulation SGX QEMU (HW emulation) 25

  26. OpenSGX: Component Overview • Emulated SGX hardware • OS emulation layer • OpenSGX user library SGX Libraries Trampoline Stub SGX OS Emulation SGX QEMU (HW emulation) 26

  27. OpenSGX: Component Overview • Emulated SGX hardware • OS emulation layer • OpenSGX user library • OpenSGX toolchain SGX Libraries Trampoline Stub SGX OS Emulation OpenSGX toolchain SGX QEMU (HW emulation) 27

  28. OpenSGX: Component Overview • Emulated SGX hardware • Enclave loader • OS emulation layer • OpenSGX user library • OpenSGX toolchain SGX Libraries Enclave Runtime Trampoline loader library Stub SGX OS Emulation OpenSGX toolchain SGX QEMU (HW emulation) 28

  29. OpenSGX: Component Overview • Emulated SGX hardware • Enclave loader • Performance monitor • OS emulation layer • Enclave debugger • OpenSGX user library • OpenSGX toolchain SGX Libraries Enclave Enclave Runtime Debugger Trampoline loader library Stub Performance Monitor SGX OS Emulation OpenSGX toolchain SGX QEMU (HW emulation) 29

  30. OpenSGX: Component Overview • Emulated SGX hardware • Enclave loader • Performance monitor • OS emulation layer • Enclave debugger • OpenSGX user library • OpenSGX toolchain Enclave Program SGX Libraries Enclave Enclave Runtime Debugger Trampoline loader library Stub Performance Monitor SGX OS Emulation OpenSGX toolchain SGX QEMU (HW emulation) 30

Recommend


More recommend