Parallelizing Security Checks on Commodity Hardware Ed Nightingale Dan Peek, Peter Chen Jason Flinn Microsoft Research University of Michigan.

Slides:



Advertisements
Similar presentations
Remus: High Availability via Asynchronous Virtual Machine Replication
Advertisements

Paging: Design Issues. Readings r Silbershatz et al: ,
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen Jason Flinn University of Michigan.
Dec 5, 2007University of Virginia1 Efficient Dynamic Tainting using Multiple Cores Yan Huang University of Virginia Dec
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 5: Threads Overview Multithreading Models Threading Issues Pthreads Solaris.
03/09/2007CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Dongyoon Lee, Benjamin Wester, Kaushik Veeraraghavan, Satish Narayanasamy, Peter M. Chen, and Jason Flinn University of Michigan, Ann Arbor Respec: Efficient.
Remus: High Availability via Asynchronous Virtual Machine Replication.
DoublePlay: Parallelizing Sequential Logging and Replay Kaushik Veeraraghavan Dongyoon Lee, Benjamin Wester, Jessica Ouyang, Peter M. Chen, Jason Flinn,
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 4: Threads.
Operating System Support for Application-Specific Speculation Benjamin Wester Peter Chen and Jason Flinn University of Michigan.
Accelerating Mobile Applications through Flip-Flop Replication
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Secure Virtual Architecture John Criswell, Arushi Aggarwal, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve University of Illinois at Urbana-Champaign.
1 AutoBash: Improving Configuration Management with Operating System Causality Analysis Ya-Yunn Su, Mona Attariyan, and Jason Flinn University of Michigan.
Protection and the Kernel: Mode, Space, and Context.
Orchestra: Intrusion Detection Using Parallel Execution and Monitoring of Program Variants in User-Space Babak Salamat, Todd Jackson, Andreas Gal, Michael.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Parallelizing Security Checks on Commodity Hardware E.B. Nightingale, D. Peek, P.M. Chen and J. Flinn U Michigan.
Processes and OS basics. RHS – SOC 2 OS Basics An Operating System (OS) is essentially an abstraction of a computer As a user or programmer, I do not.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Games Development 2 Concurrent Programming CO3301 Week 9.
Christopher Kruegel University of California Engin Kirda Institute Eurecom Clemens Kolbitsch Thorsten Holz Secure Systems Lab Vienna University of Technology.
CS 211: Computer Architecture Lecture 6 Module 2 Exploiting Instruction Level Parallelism with Software Approaches Instructor: Morris Lancaster.
SPECULATIVE EXECUTION IN A DISTRIBUTED FILE SYSTEM E. B. Nightingale P. M. Chen J. Flint University of Michigan.
Lawrence Livermore National Laboratory Pianola: A script-based I/O benchmark Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA
Chapter 4 – Threads (Pgs 153 – 174). Threads  A "Basic Unit of CPU Utilization"  A technique that assists in performing parallel computation by setting.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan.
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
Introduction to Operating Systems and Concurrency.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
Processes and Virtual Memory
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Exploiting Instruction Streams To Prevent Intrusion Milena Milenkovic.
Speculation Supriya Vadlamani CS 6410 Advanced Systems.
Threads. Readings r Silberschatz et al : Chapter 4.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Execution Replay and Debugging. Contents Introduction Parallel program: set of co-operating processes Co-operation using –shared variables –message passing.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan Best Paper at SOSP 2005 Modified for CS739.
Lecturer 3: Processes multithreaded Operating System Concepts Process Concept Process Scheduling Operation on Processes Cooperating Processes Interprocess.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Speculative execution Landon Cox April 13, Making disk accesses tolerable Basic idea Remove disk accesses from critical path Transform disk latencies.
CS 162 Discussion Section Week 2. Who am I? Prashanth Mohan Office Hours: 11-12pm Tu W at.
Threads prepared and instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University 1July 2016Processes.
Introduction to threads
Optimistic Hybrid Analysis
Chapter 4: Multithreaded Programming
Process Management Presented By Aditya Gupta Assistant Professor
Bruhadeshwar Meltdown Bruhadeshwar
Chapter 4: Threads.
OS Virtualization.
Page Replacement.
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
CS703 - Advanced Operating Systems
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Parallelizing Dynamic Information Flow Tracking
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
Speculative execution and storage
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
CS510 Operating System Foundations
Chapter 4: Threads.
COMP755 Advanced Operating Systems
CSE 542: Operating Systems
Presentation transcript:

Parallelizing Security Checks on Commodity Hardware Ed Nightingale Dan Peek, Peter Chen Jason Flinn Microsoft Research University of Michigan

Run-time security checks Provide run-time intrusion detection/prevention  Many powerful checks have been proposed  Examples: Taint-analysis, on-access virus scanning, system call graph modeling Often impose high performance penalties What makes run-time checks slow? ASPLOS

Problem ASPLOS AA B C D Application 1)Begin application 2)Pause execution 3) Run security check Application & security check 4) Resume application PAUSE RESUME B PAUSE RESUME C PAUSE RESUME D PAUSE Checks may slow performance by 10x

Solution Speck (Speculative parallel check)  Parallelize checks across many cores  Provide security equivalent to sequential check Use three techniques  Transparent kernel replay system  Operating system support for speculative execution  Buffer dependent output until checks complete ASPLOS

Accelerating checks with Speck ASPLOS A B cpu0cpu1cpu2 C cpu3 D cpu4 Speculate! 2) Execute check in parallel 1) Run process speculatively 3) Start later checks in parallel to earlier ones Speed of parallelization without sacrificing safety!

Outline Introduction Implementing Speck Parallelizing security checks ASPLOS

Example: Executing sequentially All state ‘frozen’ and available to security check  Examples – heap, address space, file name, system call, value of a single address in memory ASPLOS A PAUSE

Example: Executing in parallel How does security check get app state? ASPLOS A cpu0cpu1 fork() Speck uses fork() to copy state to other core

fork() Example: Executing in parallel ASPLOS B C D cpu0 A cpu1 B epoch 0 Amortize fork by grouping checks into epochs What happens when app interacts with OS? epoch 1 fork() cpu2 E E C F F

Safely executing system calls Some system calls affect state of calling process  Introduces non-determinism in execution Other system calls may affect other processes  Other processes may be compromised as well Some system calls generate output  Output to screen or network cannot be undone ASPLOS

Replaying non-determinism Speck replays system calls that affect process state  Some system calls (mmap) re-executed  Signal delivery limited to exit from system call Prevents instrumented clone from diverging ASPLOS Uninst Process Inst Clone Execute read() data OS Execute read()

Tracking causal dependencies Speculator [sosp05] tracks causal dependencies  Supports FIFOs, pipes, UNIX sockets etc.  Undo log associated with each object  Do not handle multi-threading (MP replay hard)  All dependent objects rolled back on failure Uninstrumented process terminated on failure Uninstrumented process can safely run ahead ASPLOS

Handling output commits Problem: Some system calls create output Output to network or screen buffered When all checks within epoch complete dependent output released ASPLOS

Equivalence/Safety Assume attacker cannot compromise  Speck in-kernel replay system  Speculator in-kernel causal dependency tracking Replay system ensures code equivalence  Instrumented clone does not diverge Speculator prevents permanent damage  Speculator rolls back all dependent state on failure ASPLOS

Outline Introduction Implementing Speck Parallelizing security checks ASPLOS

Choosing security checks All checks depend upon uninstrumented process  Amount of state determines Speck strategy  Some checks require little state or run infrequently No need for fork and replay…just pause app and ship state Some checks depend upon result of earlier check  Independent checks easy to parallelize  Many dependencies make parallelization harder  Example: taint analysis ASPLOS

Using Speck to parallelize checks Process memory analysis  Sensitive data leaks System call analysis  On-access virus scanner Data flow analysis  Taint analysis ASPLOS

Process Memory Analysis Checking for transient leaks of sensitive data Our check examines every memory store  Looks for signature of sensitive data  Examines all 16 byte windows around address  Use Pin dynamic binary rewriting tool Later checks do not depend on earlier checks ASPLOS

MPlayer video decoding Speck 7.5x faster with 8 cores  Video plays in real time ASPLOS

On-access virus scanner Scan files on-access by a process  Many different policies -- on-read on-write etc. Our check scans each file on-close  Emulates news/ server  Implemented using ClamAV libraries (180K sigs) Little state is required and checks independent  Speck does not use fork and replay for this check ASPLOS

PostMark benchmark 2.8x more TPS ASPLOS

Taint analysis Trace flow of data from untrusted sources  Instrument application at instruction granularity  Update map of tainted addresses at run-time  Ensure certain addresses are not tainted Later checks depend on result of earlier checks  Running in parallel cannot tell whether address was tainted during prior check ASPLOS

Parallelizing taint analysis New algorithm minimizes sequential processing ASPLOS fork() B C D cpu0 A cpu1 A B fork() cpu2 C D …cpu n log

Dynamic taint compression Dependency logs were very large  Time to process longer than to run sequential check Only care about dependencies before check  Addresses and registers often overwritten  Eliminate unimportant dependencies  Reduce log size 6x ASPLOS

Taint analysis: MPlayer 2x speedup on 8-cores ASPLOS

Choosing a strategy ASPLOS CheckState required/ When required Checks independent? Fork & replay? Work to make ||? Memory analysis Memory On store Yes None Virus check File name On file close YesNoA little Taint analysis Rep. of addr space On data flow inst. NoYesA lot Fork & replay – need to attach check at fork No fork & replay – need to accept concurrent requests

Conclusion Run-time security checks can be slow Speck accelerates run-time checks  Parallelizing across many cores  Provides safety of executing checks sequentially ASPLOS