Attacks on Virtual Machine Emulators

Slides:



Advertisements
Similar presentations
Virtualization Technology
Advertisements

EUROSEC 2011 Gábor Pék, Boldizsár Bencsáth and Levente Buttyán Laboratory of Cryptography and Systems Security Budapest University of Technology and Economics.
Attacks on Virtual Machine Emulators Peter Ferrie, Senior Principal Researcher 12 April, 2007.
Attacks on Virtual Machine Emulators Peter Ferrie, Security Architect 4 October, 2007.
E Virtual Machines Lecture 3 Memory Virtualization
Virtual Machine Security Design of Secure Operating Systems Summer 2012 Presented By: Musaad Alzahrani.
Xen and the Art of Virtualization A paper from the University of Cambridge, presented by Charlie Schluting For CS533 at Portland State University.
Network Implementation for Xen and KVM Class project for E : Network System Design and Implantation 12 Apr 2010 Kangkook Jee (kj2181)
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
A Brief Introduction To Virtualization Technologies Yin Yunqiao HP.
LINUX Virtualization Running other code under LINUX.
Xen and the Art of Virtualization. Introduction  Challenges to build virtual machines Performance isolation  Scheduling priority  Memory demand  Network.
To run the program: To run the program: You need the OS: You need the OS:
CSE 451: Operating Systems Winter 2012 Module 18 Virtual Machines Mark Zbikowski and Gary Kimura.
Tanenbaum 8.3 See references
Operating System Virtualization
CS 149: Operating Systems April 21 Class Meeting
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
CS533 Concepts of Operating Systems Jonathan Walpole.
Virtualization Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is licensed.
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.
CS533 Concepts of Operating Systems Jonathan Walpole.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Introduction to virtualization
Operating Systems Security
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Full and Para Virtualization
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,
Introduction Why are virtual machines interesting?
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Programming with Java. Chapter 1 Focuses on: –components of a computer –how those components interact –how computers store and manipulate information.
Harvesting Free Windows CPU Cycles for Linux Applications using Sandboxing Rasmus Andersen Dept. of Computer Science, University of Copenhagen, Denmark.
Virtualization Neependra Khare
1 Virtualization "Virtualization software makes it possible to run multiple operating systems and multiple applications on the same server at the same.
Chapter Overview General Concepts IA-32 Processor Architecture
Virtualization for Cloud Computing
Introduction to Virtualization
Virtualization.
Virtual Machine Monitors
Efficient Software-Based Fault Isolation
Agenda Hardware Virtualization Concepts
Introduction to Operating Systems
Chapter Objectives In this chapter, you will learn:
MICROPROCESSOR BASED SYSTEM DESIGN
Windows API.
Virtualization overview
Disco: Running Commodity Operating Systems on Scalable Multiprocessors
Running other code under LINUX
CIT 480: Securing Computer Systems
OS Virtualization.
Introduction to Operating Systems
Virtualization Techniques
A Survey on Virtualization Technologies
CS 140 Lecture Notes: Virtual Machines
Lecture 36 Syed Mansoor Sarwar
CS533 Concepts of Operating Systems Class 15
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CS533 Concepts of Operating Systems Class 15
Introduction to Virtual Machines
Lecture 8: Efficient Address Translation
CSE 471 Autumn 1998 Virtual memory
Introduction to Virtual Machines
CS 140 Lecture Notes: Virtual Machines
Xen and the Art of Virtualization
A Virtual Machine Monitor for Utilizing Non-dedicated Clusters
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CS295: Modern Systems Virtualization
Presentation transcript:

Attacks on Virtual Machine Emulators Peter Ferrie Senior Principal Researcher Symantec Security Response 5 December 2006

A G E N D A Attack Types Types of Virtual Machine Emulators Detection of Hardware VMEs Detection of Software VMEs What can we do? Q and A 1 2 3 4 5 6

Attack Types DETECTION DENIAL-OF-SERVICE ESCAPE!

Attack Types : Detection

Attack Types : Detection

Attack Types : Denial-of-Service

Attack Types : Escape!

Attack Types : Escape!

Types of Virtual Machine Emulators Hardware-Bound Pure Software Hardware-Assisted Reduced-Privilege Guest

Reduced-Privilege Guest VMEs Software-based virtualization of important data structures and registers Guest runs at lower privilege level than before No way to avoid notification of all CPU events

Examples of Reduced-Privilege Guest VMEs VMware Xen Parallels Virtuozzo (probably)

Hardware-Assisted VMEs Uses CPU-specific instructions to place system into virtual mode Guest privileges unchanged Separate host and guest copies of important data structures and registers Guest copies have no effect on the host Host can request notification of specific CPU events

Examples of Hardware-Assisted VMEs BluePill Vitriol Xen 3.x Virtual Server 2005 Parallels Virtuozzo (probably)

Detection of Hardware VMEs : TSC Method Physical Hardware Virtual Hardware T1……Instruction 1 T1.……..Instruction 1 T1+1...Instruction 2 T1+1…..Instruction 2 T1+2...Instruction 3 T1+2…..[VM fault] T1+N….Instruction 3 where N is a large number

Detection of Hardware VMEs : TLB Method 1 T1………read memory 1 T1+X1…read memory 2 T1+X2…read memory 3 T1+X3…read memory 4 FT (Fill Time) = ((T1+X3)-T1)/4 T2………read memory 1 T2+Y1…read memory 2 T2+Y2…read memory 3 T2+Y3…read memory 4 CT (Cached Time) = ((T2+Y3)-T2)/4 2

Detection of Hardware VMEs : TLB Method Execute CPUID T3………read memory 1 T3+Z1…read memory 2 T3+Z2…read memory 3 T3+Z3…read memory 4 DT (Detect Time) = ((T3+Z3)-T3)/4 If DT ~= CT, then physical If DT ~= FT, then virtual 3 4 5

Pure Software VMEs CPU operation implemented entirely in software Emulated CPU does not have to match physical CPU Portable Can optionally support multiple CPU generations Examples Hydra Bochs QEMU

Pure Software VMEs (Hybrid model) Commonly used by anti-virus software Emulates CPU and partial operating system CPU operation implemented entirely in software Examples Atlantis Sandbox

Malicious VMEs (SubVirt) Reduced-privilege guest Installs second operating system Runs on Windows and Linux Carries VirtualPC for Windows Carries VMware for Linux Difficult to detect compromised system

Detecting VMware IDT/GDT at high memory address Non-zero LDT Port 5658h Windows registry Video and ROM BIOS text strings Device names MAC address ranges

Detecting VirtualPC IDT/GDT at high memory address Non-zero LDT 0F 3F opcode 0F C7 C8 opcode Overly long instruction Device names

Detecting Parallels IDT/GDT at high memory address Non-zero LDT Device names

Detecting Bochs [WB] INVD flushes TLBs REP CMPS/SCAS flags CPUID processor name CPUID AMD K7 Easter Egg 32-bit ARPL register corruption 16-bit segment wraparound Device names

Attacking Bochs Bochs denial-of-service Floppy with >18 sectors per track Floppy with >512 bytes per sector Non-ring0 SYSENTER CS MSR

Detecting Hydra REP MOVS/SCAS integer overflow 16-bit segment wraparound

Detecting QEMU CPUID processor name CPUID K7 Easter Egg CMPXCHG8B memory write Double-faulting CPU

Detecting Atlantis and Sandbox Unimplemented APIs Incorrectly-emulated APIs Example: Beep() in Windows 9x vs Windows NT Unfortunately correct emulation Example: not crashing on corrupted WMFs

What can we do? Reduced-privilege guests VirtualPC Bochs, Hydra, QEMU Nothing VirtualPC Intercept SIDT Check for maximum instruction length Remove custom CPUID processor name Bochs, Hydra, QEMU Bug fixes Full stealth should be possible

Questions? Thank you. e-mail: peter_ferrie@symantec.com