haven
play

Haven Shielding applications from an untrusted cloud Andrew - PowerPoint PPT Presentation

Haven Shielding applications from an untrusted cloud Andrew Baumann Marcus Peinado Galen Hunt Microsoft Research In the old days Application Operating system 2 In the old days Application Operating system 2 In the old days


  1. Haven Shielding applications from an untrusted cloud Andrew Baumann Marcus Peinado Galen Hunt Microsoft Research

  2. In the old days… Application Operating system 2

  3. In the old days… Application Operating system 2

  4. In the old days… Application Operating system 2

  5. In the cloud Application Operating system Cloud platform Trust…? 3

  6. In the cloud Application Operating system Cloud platform Trust…? 3

  7. In the cloud Application Operating system Cloud platform Trust…? 3

  8. In the cloud Application Operating system Cloud platform Trust…? 3

  9. Our goals for Haven Secure, private execution of unmodified applications (bugs and all) in an untrusted cloud on commodity hardware (Intel SGX) 4

  10. Can you trust the cloud? • Huge trusted computing base Application • Privileged software Operating system Hypervisor, firmware, ... • Management stack Trust Hypervisor • Staff Sysadmins, cleaners, security, … Firmware/bootloader • Law enforcement • Hierarchical security model Management tools • Observe or modify any data • Even if encrypted on disk / net People … 5

  11. Current approaches 6

  12. Hardware Security Modules • Dedicated crypto hardware • Expensive • Limited set of APIs • Key storage • Crypto operations • Protects the “crown jewels”, not general -purpose 7

  13. Trusted hypervisors • Use a small, secure, hypervisor • Ensures basic security, such as strong isolation Problem #1: system administrators Problem #2: physical attacks (e.g. memory snooping) Problem #3: tampering with hypervisor ✓ 8

  14. Remote attestation • Trusted hardware: TPM chip • Basic idea: • Signed measurement (hash) of privileged software • Remote user checks measurement • Incorrect attestation → compromised software • Problem: what is the expected measurement? • Cloud provider applies patches and updates • Must trust provider for current hash value 9

  15. What do we really want? 10

  16. Secure colo provides: • Power and cooling • Network access 11

  17. Secure colo provides: • Power and cooling Raw resources • Network access Untrusted I/O 11

  18. Shielded execution • Protection of specific program from rest of system • cf. protection, isolation, sandboxing, etc. • New term (older concept) • Program unmodified, naïve to threats • Confidentiality and integrity of: • The program • Its intermediate state, control flow, etc. → Input and output may be encrypted • Host may deny service, cannot alter behaviour 12

  19. Threat model • We assume a malicious cloud provider • Convenient proxy for real threats • All the provider’s software is malicious • Hypervisor, firmware, management stack, etc. • All hardware besides the CPU is untrusted • DMA attacks, DRAM snooping, cold boot • We do not prevent: • Denial-of- service (don’t pay!) • Side-channel attacks 13

  20. Intel SGX Enclave Application (untrusted) Operating system (untrusted) 14

  21. Intel SGX • Hardware isolation for an enclave Secret EnclaveEntry: mov fs:[Tcs],rbx mov fs:[CSSA],eax Data cmp eax, 0 • New instructions to jne ExceptionEntry mov r10,fs:[ResAdr] cmp r10,0 je @F establish, protect jmp r10 @@:mov rcx, r8 mov rdx, r9 Enclave mov r8, rbx • Call gate to enter Application (untrusted) • Remote attestation Operating system (untrusted) 14

  22. SGX at the hardware level Virtual address space Physical memory RAM Enclave EPC Code/data Page table Encrypted & mappings integrity-protected checked 15

  23. SGX at the hardware level Virtual address space Physical memory RAM Enclave EPC Code/data Page table Encrypted & mappings integrity-protected checked Also: • Protected register file • Secure control transfer 15

  24. Design challenge: Iago attacks System calls Application Enclave Operating system 16

  25. Iago attacks • malloc() returns pointer to user’s stack • Scheduler allows two threads to race in a mutex • System has 379,283 cores and -42MB of RAM • read() fails with EROFS • … Our approach: • Don’t try to check them all • Admit OS into trusted computing base 17

  26. Haven Picoprocess (protects host from guest) Enclave (protects guest from host) • Unmodified binaries Application • Subset of Windows, Windows 8 API enlightened to run in-process Library OS (Drawbridge) Drawbridge ABI Shield module Mutual • Shields LibOS from Iago attacks distrust Untrusted interface Untrusted runtime • Includes typical kernel functionality Drawbridge ABI & SGX priv ops • Scheduling, VM, file system Drawbridge host SGX driver • Untrusted interface with host Windows kernel 18

  27. Untrusted interface Picoprocess • Host/guest mutual distrust Enclave • Policy/mechanism with a twist • Virtual resource policy in guest Application Windows 8 API Virtual address allocation, threads • Physical resource policy in host Library OS Physical pages, VCPUs Drawbridge ABI Shield module • ~20 calls, restricted semantics Untrusted interface Untrusted runtime Drawbridge ABI & SGX priv ops Drawbridge host SGX driver Windows kernel 19

  28. Shield module Picoprocess • Memory allocator, region manager Enclave • Host commits/protects specific pages • No address allocation • Private file system Application • Encrypted, integrity-protected VHD Windows 8 API • Scheduler Library OS Don’t trust host to schedule threads Drawbridge ABI • Exception handler Shield module • Emulation of some instructions Untrusted interface • Sanity-check of untrusted inputs Untrusted runtime • Anything wrong → panic! Drawbridge ABI & SGX priv ops • 23 KLoC (half in file system) Drawbridge host SGX driver Windows kernel 20

  29. SGX limitations 1. Dynamic memory allocation and protection • New instructions needed 2. Exception handling • SGX doesn’t report page faults or GPFs to the enclave 3. Permitted instructions • RDTSC/RDTSCP needed, for practicality and performance 1. Thread-local storage • Can’t reliably switch FS and GS 21

  30. SGX limitations 1. Dynamic memory allocation and protection • New instructions needed 2. Exception handling • SGX doesn’t report page faults or GPFs to the enclave Good news! 3. Permitted instructions These are fixed in SGX v2 • RDTSC/RDTSCP needed, for practicality and performance 1. Thread-local storage • Can’t reliably switch FS and GS 21

  31. Performance evaluation • Implemented and tested using SGX emulator • Thanks, Intel! • Problem: no SGX implementation yet • Solution: model for SGX performance 1. TLB flush on Enclave crossings 2. Variable spin-delay for critical SGX instructions • Enclave crossings • Dynamic memory allocation, protection 1.Penalty for access to encrypted memory • Slow overall system DRAM clock 22

  32. Performance summary • Depends on model parameters, details in paper • 35% (Apache) – 65% (SQL Server) slowdown vs. VM • Assumes 10k+ cycles SGX instructions, 30% slower RAM • … and you don’t have to trust the cloud! 23

  33. What’s next? • Rollback of persistent storage • Requires more hardware or communication • Untrusted time • Network time sync, RDTSC • Cloud management • Suspend / resume / migrate applications • Encrypted VLANs 24

  34. Conclusion • Closer to a true “utility computing” model • Utility provides raw resources • Doesn’t care what you do with them • Why trust the cloud when you don’t have to ? Thanks! baumann@microsoft.com 25

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend