Native Client: A Sandbox for Portable, Untrusted x86 Native Code

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Secure In-VM Monitoring Using Hardware Virtualization Monirul Sharif, Wenke Lee, Weidong Cui, and Andrea Lanzi Presented by Tyler Bletsch.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, David Becker, Marc.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Bennet Yee, David Sehr, Gregory Dardyk, J. Bradley Chen, Robert Muth, Tavis Ormandy, Shiki Okasaka, Neha Narula, and Nicholas Fullagar Google Inc
OmniVM Efficient and Language- Independent Mobile Programs Ali-Reza Adl-Tabatabai, Geoff Langdale, Steven Lucco and Robert Wahbe from Carnegie Mellon University.
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Efficient Software-Based Fault Isolation—sandboxing Presented by Carl Yao.
Input / Output CS 537 – Introduction to Operating Systems.
Stack Management Each process/thread has two stacks  Kernel stack  User stack Stack pointer changes when exiting/entering the kernel Q: Why is this necessary?
Previous Next 06/18/2000Shanghai Jiaotong Univ. Computer Science & Engineering Dept. C+J Software Architecture Shanghai Jiaotong University Author: Lu,
A genda for Today What is memory management Source code to execution Address binding Logical and physical address spaces Dynamic loading, dynamic linking,
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
CS533 Concepts of Operating Systems Jonathan Walpole.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
11 World-Leading Research with Real-World Impact! ZeroVM Backgroud Prosunjit Biswas Institute for Cyber Security University of Texas at San Antonio April.
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Efficient Software-Based Fault Isolation By Robert Wahbe, Steven Lucco, Thomas E. Anderson, and Susan L. Graham Presented by Pehr Collins.
Efficient Software Based Fault Isolation Author: Robert Wahobe,Steven Lucco,Thomas E Anderson, Susan L Graham Presenter: Maitree kanungo Date:02/17/2010.
Efficient Software-based Fault Isolation Robert Wahbe, Steven Lucco, Thomas E. Anderson & Susan L. Graham Presented By Tony Bock.
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
1 "Efficient Software-based Fault Isolation" by R. Wahbe, S. Lucco, T. E. Anderson, and S. L. Graham. Presenter: Tom Burkleaux.
Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
Threads. Readings r Silberschatz et al : Chapter 4.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Efficient Software-Based Fault Isolation Authors: Robert Wahbe Steven Lucco Thomas E. Anderson Susan L. Graham Presenter: Gregory Netland.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
Qin Zhao1, Joon Edward Sim2, WengFai Wong1,2 1SingaporeMIT Alliance 2Department of Computer Science National University of Singapore
Computer Security: Chapter 5 Operating Systems Security.
Memory Protection: Kernel and User Address Spaces Andy Wang Operating Systems COP 4610 / CGS 5765.
Introduction to Operating Systems Concepts
Efficient Software-Based Fault Isolation
Introduction to Operating Systems
Memory Protection: Kernel and User Address Spaces
EnGarde: Mutually Trusted Inspection of SGX Enclaves
Selective Code Compression Scheme for Embedded System
Protection UQ: Explain the protection mechanism of X86 Intel family microprocessor(10 Marks)
Memory Protection: Kernel and User Address Spaces
Continuous, Low Overhead, Run-Time Validation of Program Executions
Introduction to Operating Systems
Memory Protection: Kernel and User Address Spaces
Memory Protection: Kernel and User Address Spaces
MEMORY MANAGEMENT & their issues
Security in Java Real or Decaf? cs205: engineering software
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Prof. Leonardo Mostarda University of Camerino
SCONE: Secure Linux Containers Environments with Intel SGX
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Lecture 13 Harvard architecture Coccone OS demonstrator
Landon Cox January 17, 2018 January 22, 2018
Memory Protection: Kernel and User Address Spaces
Dynamic Binary Translators and Instrumenters
Web Application Development Using PHP
Presentation transcript:

Native Client: A Sandbox for Portable, Untrusted x86 Native Code Yan Qiang, 2010-05-20

Conference & Authors S&P 09’ Google Inc Best paper award Bennet Yee, David Sehr, Gregory Dardyk, J. Bradley Chen, Robert Muth, Tavis Ormandy, Shiki Okasaka, Neha Narula, and Nicholas Fullagar Best paper award

Outline We can now safely run native applications in the web browser! System design and implementation Experience report Ambition of Google

Everyone uses the web browser Browser is the most important tool to get the information in modern society. Restricted environment for safety purpose. Interpreter-based sandbox Slow Native plug-ins for extra performance or functionality requirements. Fast, versatile Trust-based protection but not safe

Native code == unsafe? “No fundamental reason why native code should be unsafe” Traditional difficulties: The problem of deciding the outcome of arbitrary native code with executing it is undecidable. Many unexpected side effects during code execution. Exception, interrupt, racing condition, I/O. But a safe and efficient isolated environment can be created for restricted native code.

Threat model Achieve comparable safety to accepted systems such as JavaScript. Input: arbitrary code and data support multi-threading, inter-module communication Restrictions (Obligations): No code page writing: No self-modification code, No JIT No direct system call: No I/O No hardware exception/interrupt: failsafe No ambiguous indirect control flow transfer Isolated direct memory access

Obey me or die Check by static analysis Binary code satisfies the obligations Check by static analysis Native Client (NaCl) Binary code does not satisfy the obligations

Microkernel-based architecture Untrusted native code runs in its own private address space created by X86 segment registers (%cs, %ds, %gs, %fs, %ss). Each NaCl module runs as a separated process. All dangerous interfaces are forbidden or monitored by the sandbox (including the instructions modifying the segment registers).

Obligations for control flow transfer

Security properties under obligations A static code analysis will ensure: Data integrity All memory addresses are within the sandbox Otherwise, a segmentation fault given (%cs, %ds,… are set) Reliable disassembly All possible jump targets are known (mandatory 32byte alignment for all jump instructions) No unsafe instructions Disassembler is reliable Control flow integrity Same reason for reliable disassembly

Load a NaCl module 64KB Memory address: Verify the module code according to the obligations. Load control code block into memory (including system call trampolines, thread context data). Load the module code and data into memory. Set the segment registers to establish a private memory space (64KB afterwards, 64KB is the zero offset). Transfer the control to the module code. Control Code Block 64KB Module Code and Data User far call to access system call trampolines. (call the routine out of current memory segmentation) All far calls are under control

Applications, tools, and availability Allow developer to choose any language in the browser (not just JavaScript). Allow simple, computationally intensive extensions for web applications Binary-level sandbox without a trusted compiler Tools: GCC tool chain on Ubuntu Linux, MacOS, Windows XP Availability: open source, part of Chrome http://code.google.com/p/nativeclient/

Easier than you imagine Ported programs mentioned: SPEC CPU 2000 benchmarks Some graphics computation demo H.264 video decoder Physics simulation system FPS game (Quake)

Insignificant performance overhead Max space overhead is 57.5% code size increment for gcc in SPEC CPU 2000. Mandatory alignment for jump targets impacts the instruction cache and increases the code size (more significant if compared to dynamic linked executables).

Kill Bill Operating system runs native code => Web browser runs native code Browser plug-in runs native code

Company involved open source software is reshaping IT world Does It seem too good to be true?