Ryoan: A Distributed Sandbox for Untrusted Computation on Secret Data Tyler Hunt , Zhiting Zhu, Yuanzhong Xu, Simon Peter, Emmett Witchel 1
Disease risk assessment: Trust issues D i s e a s e R i s k 2
Disease risk assessment: Trust issues Classification Result D i s e a s e R i s k 3
Disease risk assessment: Trust issues Classification Result Disease Risk 4
Disease risk assessment: Trust issues Classification Result Disease Risk 5
Disease risk assessment: Trust issues Classification Result D i s e a s e R i s k 6
Disease risk assessment: Trust issues Classification Result D i s e a s e R i s k 7
Talk outline Introduction Controlling untrusted modules Covert and side channels Evaluation 8
Ryoan’s goals ◎ Provide user data secrecy ○ Without trusting the application ○ Without trusting the platform (OS, Hypervisor) ◎ Support cooperation between service providers Userspace Platform ( ) 9
Ryoan’s goals ◎ Provide user data secrecy ○ Without trusting the application ○ Without trusting the platform (OS, Hypervisor) ◎ Support cooperation between service providers Ryoan Sandbox Userspace Platform ( ) 10
Ryōan-ji 11
Threat model Users Service Providers Everyone Don’t trust ◎ Control platforms Trusts Ryoan ◎ ◎ service providers Don’t trust other Trusts Intel SGX ◎ ◎ for secrecy service provides Don’t trust ◎ for secrecy platforms for secrecy - Untrusted Code - Ryoan - User - User Data - Untrusted Platform - SGX 12
Threat model Users Service Providers Everyone Don’t trust ◎ Control platforms Trusts Ryoan ◎ ◎ service providers Don’t trust other Trusts Intel SGX ◎ ◎ for secrecy service provides Don’t trust ◎ for secrecy platforms for secrecy - Untrusted Code - Ryoan - User - User Data - Untrusted Platform - SGX 13
Threat model Users Service Providers Everyone Don’t trust ◎ Control platforms Trusts Ryoan ◎ ◎ service providers Don’t trust other Trusts Intel SGX ◎ ◎ for secrecy service provides Don’t trust ◎ for secrecy platforms for secrecy - Untrusted Code - Ryoan - User - User Data - Untrusted Platform - SGX 14
Threat model Users Service Providers Everyone Don’t trust ◎ Control platforms Trusts Ryoan ◎ ◎ service providers Don’t trust other Trusts Intel SGX ◎ ◎ for secrecy service provides Don’t trust ◎ for secrecy platforms for secrecy - Untrusted Code - Ryoan - User - User Data - Untrusted Platform - SGX 15
Ryoan’s world Modules Sandboxes Platforms NaCl x86 binaries Trusted code More service ◎ ◎ ◎ from service Confine modules providers’ code ◎ providers Based on Google’s Host computation ◎ ◎ Application logic Native Client (NaCl) ◎ Module 16
Ryoan’s world Modules Sandboxes Platforms NaCl x86 binaries Trusted code More service ◎ ◎ ◎ from service Confine modules providers’ code ◎ providers Based on Google’s Host computation ◎ ◎ Application logic Native Client (NaCl) ◎ Module 17
Ryoan’s world Modules Sandboxes Platforms NaCl x86 binaries Trusted code More service ◎ ◎ ◎ from service Confine modules providers’ code ◎ providers Based on Google’s Host computation ◎ ◎ Application logic Native Client (NaCl) ◎ Module 18
Ryoan’s world Modules Sandboxes Platforms NaCl x86 binaries Trusted code More service ◎ ◎ ◎ from service Confine modules providers’ code ◎ providers Based on Google’s Host computation ◎ ◎ Application logic Native Client (NaCl) ◎ Module 19
Ryoan applications Modules ◎ Request oriented Module ◎ Well defined unit of work ○ One request→one result ○ e.g, 1 email, 1 photo Composable ◎ Modules can be connected to build services 20
Talk outline Introduction Controlling untrusted modules Covert and side channels Evaluation 21
Intel SGX in 2 minutes (or less) ◎ Provides Enclaves Enclave Code’s View Regions of a process's virtual address ○ space Module Ryoan Instance ◎ Enclaves Can only be accessed by enclave code ○ Still have access to the rest of memory ○ Other Code’s View ◎ Attestations Hardware signed hashes of initial code ○ and data Enclave (Inaccessible) 22
Chain of trust ◎ SGX provides unforgeable attestation of the sandbox Attests Ryoan ◎ Statements Ryoan makes about the module can now be trusted Ryoan Attests Module 23
Ryoan’s view of SGX ◎ SGX gives you: ○ Trusted computation on secret data ◎ Ryoan uses SGX to give you: ○ Guarantees on Untrusted computation 24
Confining untrusted code Problem: ◎ Platform can read secrets out Module of memory Solution: ◎ Execute module inside of an enclave 25
Confining untrusted code Problem: ◎ Platform can read secrets out Module of memory Enclave Solution: ◎ Execute module inside of an enclave 26
Confining untrusted code Problem: ◎ Module can copy secrets to Module non-enclave memory Enclave Solution: ◎ Restrict accessible memory with a sandbox ○ Property of NaCl 27
Confining untrusted code Problem: ◎ Module can copy secrets to Module Sandbox non-enclave memory Solution: ◎ Restrict accessible memory with a sandbox ○ Property of NaCl 28
Confining untrusted code Problem: ◎ Modules can use system calls Module to write out user data Sandbox write( ); Solution: ◎ NaCl modules call sandbox to access system calls ◎ Enforce encryption 29
Confining untrusted code Problem: ◎ Modules can use system calls Module to write out user data Sandbox write([CIPHERTEXT]); Solution: ◎ NaCl modules call sandbox to access system calls ◎ Enforce encryption 30
Confining untrusted code Module Module Problem: ◎ Modules can collude with Disease Risk users to steal data It’s ME! Solution: ◎ Don’t let modules keep state between requests Later 31
Confining untrusted code Module Module Problem: ◎ Modules can collude with Disease Risk users to steal data It’s ME! Solution: ◎ Don’t let modules keep state between requests Later 32
Modules cannot keep state ◎ Module life cycle imposed by Ryoan ○ Read, process, write, destroy ◎ Sandbox enforces one request per module execution ○ Represent a complete unit of work ○ Only contain content from one user Read Write Initialize Process Input Output Destroy 33
Talk outline Introduction Controlling untrusted modules Covert and side channels Evaluation 34
Covert and side channels ◎ Output, via some externally Module visible property of execution ◎ Ryoan: Software covert channels ○ System calls ○ Execution time ◎ Hardware covert channels: ○ Hardware vendor’s responsibility 35
System call covert channel Module 0101110 write(8bytes); write(16bytes); write(8bytes); write(16bytes); write(16bytes); write(16bytes); write(8bytes); 0101110 8bytes 0 16bytes 1 36
Eliminating system call channel ◎ Remove modules ability to make system calls ◎ Ryoan performs all data input and output independent of the content Confined; Module cannot make system calls. Read Initialize Process Done Input Ryoan makes input Ryoan flushes all output available 37 Destroy
Initialization is expensive ClamAV (virus scanner): 25.0 seconds to initialize 0.1 seconds to process a request Checkpoint Confined; Module cannot make system calls. Read Initialize Process Done Input Restore Checkpoint 38
Confined compatibility API Dynamic Memory In-memory file API ◎ Modules can call ◎ File system operations mmap for “new” in memory memory ◎ Examples: ◎ Return memory from ○ Temp files a pre-allocated pool. ○ Preexisting files Replaced system calls: Replaced system calls: mmap open, close, read, write, stat, lseek, unlink, mkdir, rmdir, getdents 39
Confined compatibility API Dynamic Memory In-memory file API ◎ Modules can call ◎ File system operations mmap for “new” in memory memory ◎ Examples: ◎ Return memory from ○ Temp files a pre-allocated pool. ○ Preexisting files Replaced system calls: Replaced system calls: mmap open, close, read, write, stat, lseek, unlink, mkdir, rmdir, getdents 40
Confined compatibility API Dynamic Memory In-memory file API ◎ Modules can call ◎ File system operations mmap for “new” in memory memory ◎ Examples: ◎ Return memory from ○ Temp files a pre-allocated pool. ○ Preexisting files Replaced system calls: Replaced system calls: mmap open, close, read, write, stat, lseek, unlink, mkdir, rmdir, getdents 41
Talk outline Introduction Controlling untrusted modules Covert channels Evaluation 42
Parse Return Health Translation Classifier Input Results Moses In: Genome/health data In: French text Out: Disease risk Out: English text Images Email Recognize Face Distribute Combine Recognize Distribute Combine Horse Recognize NSFW In: Emails In: Pictures 43 Out: Spam & virus status Out: Array of objects
Recommend
More recommend