Zvi Ostfeld Slides credit: Eran Tromer

Slides:



Advertisements
Similar presentations
Secure In-VM Monitoring Using Hardware Virtualization Monirul Sharif, Wenke Lee, Weidong Cui, and Andrea Lanzi Presented by Tyler Bletsch.
Advertisements

Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Eran Tromer Slides credit: Dan Boneh, Stanford
1 Introduction to Information Security , Spring 2014 Lecture 4: Process confinement Eran Tromer Slide credits: Dan Boneh and John Mitchell, Stanford.
Virtual Machine Security Design of Secure Operating Systems Summer 2012 Presented By: Musaad Alzahrani.
Presented by Boris Yurovitsky
1 Information Security – Theory vs. Reality , Winter 2011 Lecture 5: Process confinement Eran Tromer Slides credit: Dan Boneh, Stanford course.
Running Untrusted Application Code: Sandboxing. Running untrusted code We often need to run buggy/unstrusted code: programs from untrusted Internet sites:
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
SubVirt: Implementing malware with virtual machines Yi-Min Wang Chad Verbowski Helen J. Wang Jacob R. Lorch Microsoft Research Samuel T. King Peter M.
Dan Boneh Isolation The confinement principle CS155: Computer Security.
Jiang Wang, Joint work with Angelos Stavrou and Anup Ghosh CSIS, George Mason University HyperCheck: a Hardware Assisted Integrity Monitor.
Virtualization for Cloud Computing
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Kenichi Kourai (Kyushu Institute of Technology) Takuya Nagata (Kyushu Institute of Technology) A Secure Framework for Monitoring Operating Systems Using.
Vijay Krishnan Avinesh Dupat. A rootkit is software that enables continued privileged access to a computer while actively hiding its presence from administrators.
Cosc 4010 Sandboxing. Last lecture Last time, we covered chroot, which is a method to "sandbox" a problem. –Not full proof by any means. Many simple mistakes.
Section 3.1: Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random.
Virtual Machine Security Systems Presented by Long Song 08/01/2013 Xin Zhao, Kevin Borders, Atul Prakash.
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
A Virtual Machine Introspection Based Architecture for Intrusion Detection CS598 STK Presented by Zahid Anwar.
Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering.
High Performance Computing on Virtualized Environments Ganesh Thiagarajan Fall 2014 Instructor: Yuzhe(Richard) Tang Syracuse University.
VMM Based Rootkit Detection on Android Class Presentation Pete Bohman, Adam Kunk, Erik Shaw.
CS 346 – Chapter 2 OS services –OS user interface –System calls –System programs How to make an OS –Implementation –Structure –Virtual machines Commitment.
November 19, 2008 CSC 682 Use of Virtualization to Thwart Malware Written by: Ryan Lehan Presented by: Ryan Lehan Directed By: Ryan Lehan Produced By:
1 Introduction to Information Security , Spring 2013 Lecture 8: Virtual machine confinement, trusted computing architecture Eran Tromer Slides.
Operating Systems Security
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Security Vulnerabilities in A Virtual Environment
Full and Para Virtualization
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
SubVirt: Implementing malware with virtual machines Authors: Samuel T. King, Peter M. Chen University of Michigan Yi-Min Wang, Chad Verbowski, Helen J.
Lecture 26 Virtual Machine Monitors. Virtual Machines Goal: run an guest OS over an host OS Who has done this? Why might it be useful? Examples: Vmware,
Protecting The Kernel Data through Virtualization Technology BY VENKATA SAI PUNDAMALLI id :
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
Secure Offloading of Legacy IDSes Using Remote VM Introspection in Semi-trusted IaaS Clouds Kenichi Kourai Kazuki Juda Kyushu Institute of Technology.
Virtualization-optimized architectures
Virtualization for Cloud Computing
Introduction to Virtualization
Virtual Machine Monitors
Chapter 6: Securing the Cloud
Isolation/Confinement
Introduction to Operating Systems
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.
Virtualization Dr. Michael L. Collard
The confinement principle
Written by : Thomas Ristenpart, Eran Tromer, Hovav Shacham,
Lecture 24 Virtual Machine Monitors
Operating System Structure
Disco: Running Commodity Operating Systems on Scalable Multiprocessors
1. 2 VIRTUAL MACHINES By: Satya Prasanna Mallick Reg.No
Group 8 Virtualization of the Cloud
Backtracking Intrusions
Introduction to Operating Systems
Chap 10 Malicious Software.
LAB 01 Installation of VIRTUAL MACHINE and LINUX
Windows Virtual PC / Hyper-V
Chap 10 Malicious Software.
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Sai Krishna Deepak Maram, CS 6410
SCONE: Secure Linux Containers Environments with Intel SGX
Shielding applications from an untrusted cloud with Haven
Introduction to Virtual Machines
Introduction to Virtual Machines
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Presentation transcript:

Zvi Ostfeld Slides credit: Eran Tromer Introduction to Information Security 0368-3065, Spring 2015 Lecture 10: Confinement (2/2) Zvi Ostfeld Slides credit: Eran Tromer

Confinement using Virtual Machines

Virtual machines Security benefits: Key Untrusted Code US patent 6,922,774 (NSA NetTop) Security benefits: Confinement (isolation, sandboxing) Management Monitoring Recovery Forensics (replay) Process Process Process Process Process Process OS services OS services OS kernel OS kernel Hypervisor Host OS (if Type 2) CPU Memory Devices

VMM security assumption Malware may infect guest OS and guest apps But malware cannot escape from the infected VM Cannot infect host OS Cannot infect other VMs on the same hardware Requires that VMM protect itself and is not buggy VMM is much simpler than full OS VMM API is much simpler than OS API (but host OS still has device drivers)

Example of VM security application: VMM Introspection Example of VM security application: VMM Introspection protecting the anti-virus system

Example: intrusion Detection / anti-virus Runs as part of OS kernel and user space process Kernel root kit can shutdown protection system Common practice for modern malware Standard solution: run IDS system in the network Problem: insufficient visibility into user’s machine Better: run IDS as part of VMM (protected from malware) VMM can monitor virtual hardware for anomalies VMI: Virtual Machine Introspection Allows VMM to check Guest OS internals IDS = Intrusion Detection System

Sample checks Stealth malware: Creates processes that are invisible to “ps” Opens sockets that are invisible to “netstat” 1. Lie detector check Goal: detect stealth malware that hides processes and network activity Method: VMM lists processes running in GuestOS VMM requests GuestOS to list processes (e.g. ps) If mismatch, kill VM

Sample checks (cont.) 2. Application code integrity detector VMM computes hash of user app-code running in VM Compare to whitelist of hashes Kills VM if unknown program appears 3. Ensure GuestOS kernel integrity example: detect changes to sys_call_table 4. Virus signature detector Run virus signature detector on GuestOS memory 5. Detect if GuestOS puts NIC in promiscuous mode

Covert channels and side channels in virtualization Covert channel: unintended communication channel between isolated but cooperating components (sender and receiver) Can be used to leak classified data from secure component to public component Side channel: unintended channel that lets an attacker component retrieve information from an victim component without the latter’s cooperation Often induced by low-level resource contention Process Process Process Process Process Process Key Untrusted Code OS services OS services OS kernel OS kernel Hypervisor CPU Memory Devices

An example covert channel Both VMs use the same underlying hardware To send a bit b  {0,1} malware does: b= 1: at midnight do CPU intensive calculation b= 0: at midnight do nothing At midnight, listener does a CPU intensive calculation and measures completion time Now b = 1  completion-time > threshold Many covert channel exist in running system: File lock status, cache contents, interrupts, … Very difficult to eliminate

Cache-based side-channels in cloud computing Demonstrated, using Amazon EC2 as a study case: Cloud cartography Mapping the structure of the “cloud” and locating a target on the map. Placement vulnerabilities An attacker can place his VM on the same physical machine as a target VM (40% success for a few dollars) Cross-VM exfiltration Once VMs are co-resident, secret information can be exfiltrated across VM boundary. (Simulated: theft of decryption keys!)

Virtual machine confinement: a blessing or a curse? Motivation Virtual machine confinement: a blessing or a curse?

Subvirt [King Chen Wang Verbowski Wang Lortch 2006] Virus idea: Once on the victim machine, install a malicious VMM Virus hides in VMM Invisible to virus detector running inside VM Anti-virus  Anti-virus OS VMM and virus OS HW HW

The MATRIX

Blue=virtual, red=physical

VM Based Malware (blue pill virus) [Rutkowska 2006] A virus that installs a malicious VMM (hypervisor) on-the- fly under running OS Use SVM/VT-x to create VM Microsoft Security Bulletin: (Oct, 2006) : Suggests disabling hardware virtualization features by default for client-side systems http://www.microsoft.com/whdc/system/platform/virtual/CPUVirtExt.mspx VMBRs are easy to defeat A guest OS can detect that it is running on top of VMM

VMM Detection Can an OS detect it is running on top of a VMM? Applications: Virus detector can detect VMBR Normal virus (non-VMBR) can detect VMM refuse to run to avoid reverse engineering Software that binds to hardware (e.g. MS Windows) can refuse to run on top of VMM DRM systems may refuse to run on top of VMM

VMM detection (red pill techniques) VM platforms often emulate simple hardware VMWare emulates an ancient i440bx chipset … but report 8GB RAM, dual Opteron CPUs, etc. 2. VMM introduces time latency variances Memory cache behavior differs in presence of VMM Results in relative latency in time variations for any two operations 3. VMM shares the TLB with GuestOS GuestOS can detect reduced TLB size: repeatedly access k pages and detect for what k thrashing occurs. 4. Deduplication (VMM saves single copies of identical pages) … and many more methods [GAWF’07]

VMM Detection Compatibility: ensure off the shelf software works Bottom line: The perfect VMM does not exist VMMs today (e.g. VMWare) focus on: Compatibility: ensure off the shelf software works Performance: minimize virtualization overhead VMMs do not provide transparency Anomalies reveal existence of VMM

Application-level confinement

Application-level confinement Interpreters for non-native code JavaScript, Java Virtual Machine, .NET CLR, Flash Isolating threads sharing same address space: Software Fault Isolation (SFI), e.g., Google Native Code

Userspace sandboxing using Software Fault Isolation: Google Native Client (NaCl) Browser HTML JavaScript Untrusted x86 code NPAPI NaCl runtime Run untrusted x86 for performance (e.g., Quake) Outer sandbox: Process confinement Restricts capabilities using system call interposition (on Linux: uses seccomp to tell the kernel to filter its system calls) Inner sandbox: Uses x86 memory segmentation to isolate application memory from one another Restricts allowed machine code to protect the segmentation Allows only a subset of x86 All jumps are to aligned blocks (to prevent jumping into middle of op) All inter-process communication and services are through NaCl runtime Verified during loading More info on NaCl: http://nativeclient.googlecode.com/svn/data/docs_tarball/nacl/googleclient/native_client/documentation/nacl_paper.pdf

Process confinement: Linux security modules

Linux Security Modules (in-kernel) SELinux Role-based user/process labels Object labels Identifies filesystem objects by inode and associated extended attribute (set via system policy) Policy determines who can access what Default policies, can be configured Change policy and relabel filesystem Manually relabel file system objects AppArmor Identified filesystem objects by path Smack Goal: simplicity All are Mandatory Access Control.