A Virtualization-Based Approach to Retrofitting Protection in Commodity Operating Systems.

Slides:



Advertisements
Similar presentations
Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Advertisements

Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Implementing an Untrusted Operating System on Trusted Hardware.
OS Fall’02 Virtual Memory Operating Systems Fall 2002.
Slide 1 0x1A Great Papers in Computer Security Vitaly Shmatikov CS 380S
Overshadow: A Virtualization-Based Approach to Retrofitting Protection in Commodity Operating Systems Carl Waldspurger VMware R&D ASPLOS ’08 March 3, 2008.
E Virtual Machines Lecture 3 Memory Virtualization
OS Spring ‘04 Paging and Virtual Memory Operating Systems Spring 2004.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Memory Management (II)
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management -3 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
Paging and Virtual Memory. Memory management: Review  Fixed partitioning, dynamic partitioning  Problems Internal/external fragmentation A process can.
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
Chapter 3.2 : Virtual Memory
Translation Buffers (TLB’s)
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
Comparative Operating Systems Understanding the Kernel Structure Prashant Thuppala.
Towards Application Security On Untrusted OS
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
1 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
Computer Organization
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Protection and the Kernel: Mode, Space, and Context.
80386DX.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Operating System Support for Virtual Machines Samuel T. King, George W. Dunlap,Peter M.Chen Presented By, Rajesh 1 References [1] Virtual Machines: Supporting.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Computer Architecture Memory Management Units Iolanthe II - Reefed down, heading for Great Barrier Island.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
CS533 Concepts of Operating Systems Jonathan Walpole.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-8 Memory Management (2) Department of Computer Science and Software.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
A summary by Nick Rayner for PSU CS533, Spring 2006
Virtual 8086 Mode  The supports execution of one or more 8086, 8088, 80186, or programs in an protected-mode environment.  An 8086.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
Processes and Virtual Memory
Full and Para Virtualization
Protecting The Kernel Data through Virtualization Technology BY VENKATA SAI PUNDAMALLI id :
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Tim Hamilton.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
操作系统原理 OPERATING SYSTEM Chapter 3 Memory Management 内存管理.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
What is a Process ? A program in execution.
1 Xen and the Art of Binary Modification Lies, Damn Lies, and Page Frame Addresses Greg Cooksey and Nate Rosenblum, March 2007.
Translation Lookaside Buffer
Why VT-d Direct memory access (DMA) is a method that allows an input/output (I/O) device to send or receive data directly to or from the main memory, bypassing.
Memory COMPUTER ARCHITECTURE
Presenter: Yifan Zhang
Chapter 1: Introduction
Introduction to Operating Systems
CSCI206 - Computer Organization & Programming
Translation Lookaside Buffer
Translation Buffers (TLB’s)
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Sai Krishna Deepak Maram, CS 6410
Translation Buffers (TLB’s)
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 471 Autumn 1998 Virtual memory
Translation Buffers (TLBs)
Presentation transcript:

A Virtualization-Based Approach to Retrofitting Protection in Commodity Operating Systems

outline AbstractIntroductionDesign GoalsMulti-Shadowed CloakingOvershadow OverviewOS Integration with CloakingAdapting System Calls

Abstract be integrated with existing systems. used to protect a wide range of unmodified legacy applications evaluate this approach is practical Overshadow offers a last line of defense for application data.

Introduction Overshadow adds this protection through a novel technique called multi-shadowing which leverages the extra level of indirection offered by memory virtualization in a virtual machine monitor(VMM).

Design Goals Why Overshadow targets whole-application protection The threats it attempts to address.

Why Overshadow targets whole- application protection Ease of Adoption. (可移植性) Support for Diverse Applications. (兼容性) Incremental Path to Higher Assurance. (安全 性)

The threats it attempts to address. Threat Model :建立威胁模型的原因很简单, 就是找出系统的潜在威胁并建立一个稳固 的防守策铬来对抗这些威胁。 Overshadow prevents the guest operating system from reading or modifying application code, data and registers, but makes no attempt to provide availability in the face of a hostile OS

Multi-Shadowed Cloaking Multi-Shadowing Memory Cloaking

Multi-Shadowed Cloaking To support isolation physical memory is virtualized by adding an extra level of address translation. VM(GVPN-to-GPPN) VMM (GPPN-to-MPN):maintains a pmap data structure VMM Also contain GVPN-to-MPN mappings, Since the hardware TLB caches direct GVPN- to-MPN mappings

Multi-Shadowing Multi-shadowing is a novel mechanism that supports context dependent, one-to-many GPPN-to-MPN mappings. Conceptually multiple shadow page tables are used to provide different views of guest physical memory to different shadow contexts.

Memory Cloaking Figure 1:Basic Cloaking Protocol.

State transition diagram for maintaining the secrecy and integrity of a single cloaked page. Application reads RA and writes WA manipulate plaintext page contents, while kernel reads RK and writes WK use an encrypted version of the page. A secure hash H is computed and stored immediately after page encryption, and verified immediately prior to page decryption.

Figure 1:Basic Cloaking Protocol. transition 1:encrypts the page, generates an integrity hash, map into the system shadow. transition 2:verifie its integrity hash, decrypt, map the page into application shadow. transition 3: the page is mapped read-only and its(IV,H) is retained. transition 4: the (IV,H) is discarded, and the page protection is changed to read/write. transition 5:the VMM proceeds as in transition 1

Overshadow Overview Cloaking is a low-level primitive that protects the privacy and integrity of individual memory pages. Overshadow leverages this basic mechanism to cloak whole applications, cryptographically isolating application resources from the operating system.

Figure 2. Overshadow Architecture.

The VMM enforces two virtualization barriers (gray lines). One isolates the guest from the host, and the other cryptographically isolates cloaked applications from the guest OS. The shim cooperates with the VMM to interpose on all control flow between the cloaked application and OS.

Figure 2. Overshadow Architecture. Overshadow introduces a shim into the address space of the cloaked application, which cooperates with the VMM to mediate all interactions with the OS

OS Integration with Cloaking From figure 2,we know that through shim The VMM interposes on transitions between the cloaked user-mode application and the guest kernel How dose the shim work?

Shim Overview It uses an explicit hypercall interface for interacting with the VMM(a secure communication mechanism between the guest and the VMM.); It also facilitates extensibility

Shim including Shim Memory : consist of both cloaked and uncloaked regions, each with its own distinct code, data and stack space Hypercall Interface : The VMM exports a small hypercall interface to the shim. Loading Cloaked Applications : a loader program is run with the shim linked into a distinct portion of its address space Identity Management.

Faults and Interrupts Figure 3. Control Flow for Handling Faults and Interrupts

The fault occurs in step 1, and control is transferred to the VMM. In step 2, the VMM saves the contents of all application registers to the CTC(cloaked thread context) in the cloaked shim. The VMM then zeros out the application’s general-purpose registers, 在 把权限交给 kernel 前,修改 ip 和 sp 寄存器的 值,使它指向 the uncloaked shim 的地址.

Figure 3. Control Flow for Handling Faults and Interrupts The kernel handles the fault as usual in step 3, and then returns to the trampoline handler in the uncloaked shim setup in step 2. In step 4, through the hypercall into the VMM to resume cloaked execution. In step 5, the VMM restores the registers saved in step 2, and returns control to the faulting instruction in the cloaked application.

System Call Redirection Figure 4. Control Flow for Handling System Calls

Step1 和中断处理时一样. Step2: The IP is set to an entry point in the cloaked shim corresponding to a system call dispatch handler; similarly, the SP is set to a private stack in the cloaked shim for executing this handler. The VMM then redirects control to the dispatch handler in the cloaked shim. Step3: the cloaked dispatch handler performs any operations required to proxy the system call on behalf of the application.

Figure 4. Control Flow for Handling System Calls In step 4:The return IP and SP are modified to point to addresses in the uncloaked shim. Finally, the VMM transfers control to the kernel. Step3-to-step9: 返回 ( 略 )

Managing Protection Metadata Overshadow introduces OS-neutral abstractions for cloaking both persistent and non-persistent resources, such as files and private memory regions. For each resource, protection metadata, such as (IV,H) pairs, must be managed to enforce privacy and integrity, ordering, and freshness (to prevent rollback).

Figure 5. Protection Metadata Management

Figure 5 provides an overview of the components involved in metadata protection. Questions 1. how metadata is stored and mapped to protected objects? 2. how it is used to enforce protection?

question1 Each cloaked resource is associated with a unique 64-bit resource identifier (RID). Each RID has a corresponding resource metadata object (RMD) An RMD is an ordered set of (IV,H) pairs, one per encrypted page, addressed by a 32-bit resource page number (RPN). When a resource is mapped into memory, its RMD is loaded into the metadata cache (MDC) in the VMM

question1 metadata lookaside buffer(MLB) :is used to map a virtual address to a resource (start, end) →(RID, RPN):start and end denote the virtual address range into which the resource is mapped; RID denotes the resource being mapped, and RPN denotes the first RPN in the mapping. unique security identifier (SID) that identifies an Over-shadow protection domain. address space identifier (ASID) that defines its shadow context.

question2 When a process accesses a cloaked page in its shadow context, its ASID and GVPN are known. If the page is encrypted, the access will fault into the VMM, since the GVPN is not mapped into the shadow for that ASID.The VMM looks up the faulting address in the MLB, and uses the resulting (RID, RPN) to index into the MDC and fetch the (IV,H) needed to decrypt

Thank you