Zerovm Backgroud Institute for Cyber Security
Total Page:16
File Type:pdf, Size:1020Kb
Institute for Cyber Security ZeroVM Backgroud Prosunjit Biswas Institute for Cyber Security University of Texas at San Antonio April 23, 2014 Institute of Cyber Security, ICS @ UTSA World-Leading Research with Real-World Impact! 1 Institute for Cyber Security Motivation Behind ZeroVM 1. In Amazon map/reduces a considerable amount of overhead was due to fetching the data from s3 to EC2 Instances and put it back to s3. 2. The overhead was hurting when the customers need to remake to cluster and do the map/reduce again. 3. A significant amount of customer’s money was spent due to moving the data back and forth. World-Leading Research with Real-World Impact! 2 Institute for Cyber Security Motivation Behind ZeroVM(continued) 1. can we bring to Application to the data(very limited I/O overhead)? Challenge with High I/O 2. How can we ensure no harm even if the application is malicious? Challenge with Application Isolation World-Leading Research with Real-World Impact! 3 Institute for Cyber Security What is ZeroVM ZeroVM is an open–source lightweight virtualization platform based on the Chromium Native Client project. World-Leading Research with Real-World Impact! 4 Institute for Cyber Security ZeroVM Properties 1. ZeroVM virtualizes Application not Operating System. 2. Single threaded (thus deterministic) execution 3. Constraint Resource Channel based I/O Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 5 Institute for Cyber Security ZeroVM Properties 1. ZeroVM virtualizes Application not Operating System. 2. Single threaded (thus deterministic) execution 3. Constraint Resource Channel based I/O Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 6 Institute for Cyber Security Popular Virtualizations 1. ZeroVM virtualizes Application not Operating System. 2. Does zeroVM uses process level virtualization ? No OS Level Virtualization Process Level Virtualization World-Leading Research with Real-World Impact! 7 Institute for Cyber Security Popular Virtualizations Pros: Pros: 1. Easy to maintain 1. Complete Isolation 2. Comparative low overhead. Dedicated V. Memory Dedicated V. Storage Dedicated V. CPU Cons: 2. Flexible Architecture Almost all OS is supported 1. Single Large Fault domain 3. Fault Tolerance a. One malicious app may crush the whole system. Cons: 2. No Complete isolation. 1. High Resource Overhead 2. High Maintenance Cost. OS Level Virtualization Process Level Virtualization World-Leading Research with Real-World Impact! 8 Institute for Cyber Security ZeroVM Virtualization Pros: 1. Nearly Complete Isolation - Uses Google Native Client (NaCl) Project 2. Low Resource overhead. 3. Fault Tolerant Cons: 1. Run Only special Process Level Virtualization executables/ binary. 2. 3. No support for existing World-Leading Research with Real-World Impact! 9 Institute for Cyber Security ZeroVM Properties 1. ZeroVM virtualizes Application not Operating System. 2. Single threaded (thus deterministic) execution 3. Constraint Resource Channel based I/O Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 10 Institute for Cyber Security ZeroVM Properties Single Threaded Execution: 1. ZeroVM virtualizes Application not 1. No Fork Operating System. 2. No Context Switch 2. Single threaded (thus deterministic) execution 3. No Fault due to Undeterministi c concurrency 3. Constraint Resource Channel based I/O Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 11 Institute for Cyber Security ZeroVM Properties 1. ZeroVM virtualizes Application not Operating System. 2. Single threaded (thus deterministic) execution 3. Constraint Resource Channel based I/O Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 12 Institute for Cyber Security Channel Based Input / Output Before execution ZeroVM is given a manifest/ configuration file which specify predefined Resources through Channel. Input file, Output file / File System 1. ZeroVM virtualizes Application not Operating System. Network (socket, DNS) Memory 2. Single threaded (thus deterministic) execution Channel = /tmp/input.txt, /dev/stdin, 0, 1, 0x1000, 3. Constraint Resource 0x1000, 0, 0 Channel based I/O Which means : Predefine socket port / network Zerovm input (/dev/stdin) comes from : /tmp/input.txt of Restricted Memory Access Limited Read/ Write (in bytes) local filesystem. Limited life time / Predefined 0: Only sequential Read / Write is allowed timeout 0x1000: only 1000 bytes is allowed to be read from input file. 0: 0 bytes can be written to /tmp/input.txt World-Leading Research with Real-World Impact! 13 Institute for Cyber Security An example Manifest file Channel = /dev/null, /dev/stdin, 0, 1, 999999, 999999, 0, 0 1. ZeroVM virtualizes Application not Channel = /dev/stdout, /dev/stdout, 0, 1, 0, 0, 999999, 999999 Operating System. Channel = /dev/stderr, /dev/stderr, 0, 1, 0, 0, 999999, 999999 2. Single threaded (thus deterministic) execution Version = 20130611 Program = hello.nexe 3. Constraint Resource Memory = 33554432, 1 Channel based I/O Timeout = 1 Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 14 Institute for Cyber Security ZeroVM Properties Single Threaded Execution: 1. ZeroVM virtualizes Application not Operating System. 1. No Fork 2. Single threaded (thus deterministic) 2. No Context Switch execution 3. No Fault due to 3. Constraint Resource Undeterministic Channel based I/O concurrency Predefine socket port / network Restricted Memory Access Limited Read/ Write (in bytes) Limited life time / Predefined timeout World-Leading Research with Real-World Impact! 15 Institute for Cyber Security Binary Support for ZeroVM ZeroVM executables have to be precompiled in .nexe format. Currently only C (C99) and python executables are supported. Existing C executables and python interpreter need recompilation to modify / eliminate sensitive system calls. World-Leading Research with Real-World Impact! 16 Institute for Cyber Security ZeroVM from a theoretical standpoint ZeroVM Functional Dependency and Security Google Native Client Feature Software Fault Isolation World-Leading Research with Real-World Impact! 17 Institute for Cyber Security ZeroVM from a theoretical standpoint ZeroVM Functional Dependency and Security Google Native Client Feature Software Fault Isolation World-Leading Research with Real-World Impact! 18 Institute for Cyber Security Software Fault Isolation Fault Isolation Techniques: Untrusted 1. Address Space Abstraction by Code OS ( Ex: Trusted Code Third party Cons: ( Ex: extensions) 1. Communication between address Distributed by Google ) space is very costly. Ex: Google Chrome Project Malicious access Valid access World-Leading Research with Real-World Impact! 19 Institute for Cyber Security Software Fault Isolation Fault Domain: -- Contiguous region of memory. -- have different code and data segment Fault Fault -- Code from different trust level have own fault domain. domain1 doman2 Cross Domain Communication: -- No direct memory access -- All call are implemented by RPC Fault Single Domain Restricted Access: -- the module cannot change Code segment. (dangerous, domain3 self modifying code) -- Every jump instruction must not pass single domain. -- Most Jumps are statically verified otherwise -- verified at run time with help of checking code. Distributed code / extensions must be recompiled/rewritten. World-Leading Research with Real-World Impact! 20 Institute for Cyber Security Google Native Client (NaCl) Fault Domain: -- Contiguous region of memory. -- have different code and data segment Fault Fault -- Code from different trust level have own fault domain. domain1 doman2 Cross Domain Communication: -- No direct memory access -- All call are implemented by RPC Fault Single Domain Restricted Access: -- the module cannot change Code segment. (dangerous, domain3 self modifying code) -- Every jump instruction must not pass single domain. -- Most Jumps are statically verified otherwise -- verified at run time with help of checking code. Distributed code / extensions must be recompiled/rewritten. World-Leading Research with Real-World Impact! 21 Thank You World-Leading Research with Real-World Impact!.