Under the Hood: How Actaeon Unveils Your Hypervisor



Similar documents
Hypervisor Memory Forensics

Y R O. Memory Forensics: A Volatility Primer M E M. Mariano Graziano. Security Day - Lille1 University January Lille, France

Hypervisor Memory Forensics

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

CS5460: Operating Systems. Lecture: Virtualization 2. Anton Burtsev March, 2013

CSE 501 Monday, September 09, 2013 Kevin Cleary

kvm: Kernel-based Virtual Machine for Linux

Page Modification Logging for Virtual Machine Monitor White Paper

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

Intro to Virtualization

Attacking Hypervisors via Firmware and Hardware

Intel Virtualization Technology Overview Yu Ke

A Hypervisor IPS based on Hardware assisted Virtualization Technology

9/26/2011. What is Virtualization? What are the different types of virtualization.

IOS110. Virtualization 5/27/2014 1

Nested Virtualization

How To Create A Cloud Based System For Aaas (Networking)

Virtualization. ! Physical Hardware. ! Software. ! Isolation. ! Software Abstraction. ! Encapsulation. ! Virtualization Layer. !

FRONT FLYLEAF PAGE. This page has been intentionally left blank

Virtual machines and operating systems

Outline. Introduction. State-of-the-art Forensic Methods. Hardware-based Workload Forensics. Experimental Results. Summary. OS level Hypervisor level

Compromise-as-a-Service

Attacking Hypervisors via Firmware and Hardware

Virtualization. Types of Interfaces

Nested Virtualization

Basics of Virtualisation

CPET 581 Cloud Computing: Technologies and Enterprise IT Strategies. Virtualization of Clusters and Data Centers

Virtualization for Cloud Computing

Virtualization in Linux KVM + QEMU

Lecture 2 Cloud Computing & Virtualization. Cloud Application Development (SE808, School of Software, Sun Yat-Sen University) Yabo (Arber) Xu

Jukka Ylitalo Tik TKK, April 24, 2006

Secure In-VM Monitoring Using Hardware Virtualization

Distributed and Cloud Computing

Beyond the Hypervisor

Setting up Windows Phone 8 environment in VMWare

Satish Mohan. Head Engineering. AMD Developer Conference, Bangalore

Enabling Technologies for Distributed Computing

Run-Time Deep Virtual Machine Introspection & Its Applications

Virtualization Technology. Zhiming Shen

WHITE PAPER. AMD-V Nested Paging. AMD-V Nested Paging. Issue Date: July, 2008 Revision: 1.0. Advanced Micro Devices, Inc.

COM 444 Cloud Computing

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Is Virtualization Killing SSI Research?

Hybrid Virtualization The Next Generation of XenLinux

Before we can talk about virtualization security, we need to delineate the differences between the

Nested Virtualization

Network virtualization in AutoI

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

Full and Para Virtualization

Getting the Most Out of Virtualization of Your Progress OpenEdge Environment. Libor Laubacher Principal Technical Support Engineer 8.10.

COS 318: Operating Systems. Virtual Machine Monitors

Enabling Technologies for Distributed and Cloud Computing

Virtualizing a Virtual Machine

Detection of virtual machine monitor corruptions

Is Virtualization Killing SSI Research?

Hypervisors and Virtual Machines

Introduction to Virtualization & KVM

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

How To Understand The Power Of A Virtual Machine Monitor (Vm) In A Linux Computer System (Or A Virtualized Computer)

Migration of Virtual Machines for Better Performance in Cloud Computing Environment

VIRTUALIZATION INTROSPECTION SYSTEM ON KVM-BASED CLOUD COMPUTING PLATFORMS. Advisor: Software Security Lab.

Topic 5a Operating System Fundamentals

CS 695 Topics in Virtualization and Cloud Computing and Storage Systems. Introduction

Knut Omang Ifi/Oracle 19 Oct, 2015

Stephen Coty Director, Threat Research

Virtual Computing and VMWare. Module 4

Virtualization Technologies

Virtualization VMware Inc. All rights reserved

Hyper-V R2: What's New?

Certifications and Standards in Academia. Dr. Jane LeClair, Chief Operating Officer National Cybersecurity Institute

Enterprise-Class Virtualization with Open Source Technologies

Hardware Assisted Virtualization

Virtualization. Jukka K. Nurminen

Virtualization on Linux Using KVM and libvirt. Matt Surico Long Island Linux Users Group 11 March, 2014

Machine Virtualization: Efficient Hypervisors, Stealthy Malware

A hypervisor approach with real-time support to the MIPS M5150 processor

Frontiers in Cyber Security: Beyond the OS

matasano Hardware Virtualization Rootkits Dino A. Dai Zovi

Introduction to Virtual Machines

HP Virtualization Performance Viewer

System Virtual Machines

A Choices Hypervisor on the ARM architecture

Configuring and Managing a Private Cloud with Enterprise Manager 12c

Virtualization. Dr. Yingwu Zhu

Virtualization and Cloud Computing

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Introduction to the NI Real-Time Hypervisor

How to Secure Infrastructure Clouds with Trusted Computing Technologies

CS 695 Topics in Virtualization and Cloud Computing. Introduction

Taming Hosted Hypervisors with (Mostly) Deprivileged Execution

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Implementation and Implications of a Stealth Hard-Drive Backdoor

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

Development of Type-2 Hypervisor for MIPS64 Based Systems

Cloud Computing CS

Fine-grained covert debugging using hypervisors and analysis via visualization

Virtual Machines.

Transcription:

Under the Hood: How Actaeon Unveils Your Hypervisor Eurecom, Sophia Antipolis, France, EU HITB Kuala Lumpur, October 2013

Table of Contents Eurecom S3 Security Lab What s the problem we are facing Why this tool should be useful What Actaeon is not What is Actaeon?

Eurecom S3 Security Lab

Eurecom S3 Security Lab

Eurecom S3 Security Lab Main Topics of our research lab: Exploitation Techniques. Reverse Engineering. Hardware Security: Firmware Analysis, Scada Systems. Web Security. Virtualization: Malware Detection. Forensics Analysis. Check out our publications: http://s3.eurecom.fr/publications.html Looking for motivated and Skilled PhD students!!!

What s the problem we are facing? What s the problem we are facing Why this tool should be useful What Actaeon is not What is Actaeon? Starting from a physical memory dump we design a system for recognize/analyze Hypervisors in memory and provide an interface for extract/analyze the virtual machines memory (HW-assisted Intel Virtualization).

Why this tool should be useful? What s the problem we are facing Why this tool should be useful What Actaeon is not What is Actaeon? Virtual machines are everywhere nowadays (Clouds technologies, Multiple running OSs, Security Solutions etc.) There s no forensic tool available for an automatic analysis of Virtual Machines. Even Volatiliy, the facto standard for Forensics memory analysis does not provide any tools/plugins for analyzing the virtual machines.

What Actaeon is not Eurecom S3 Security Lab What s the problem we are facing Why this tool should be useful What Actaeon is not What is Actaeon? Actaeon is not: A real-time detector for malicious Hypervisors. A forensic tool for Physical Memory Dump. A malware detector.

What is Actaeon? Eurecom S3 Security Lab What s the problem we are facing Why this tool should be useful What Actaeon is not What is Actaeon? Actaeon is a forensic Analyzer based on Volatiliy core that is able to spot and analyze hypervisors from a physical memory dump. Actaeon provides three main functionalities: VMCS Layout Extractor: This component is designed to extract the exact layout of a VMCS, by implementing a reverse engineering algorithm. Hyper-ls: This component is implemented for the Volatility framework, Its goal is to scan the memory image to extract the VMCSs memory structures. Virtual Machine Introspection Patch: Acteon provides a transparent interface for analyzing physical memory of virtual machines.

Actaeon Architecture Analyzer What s the problem we are facing Why this tool should be useful What Actaeon is not What is Actaeon? M-Scanner VMCS0N VMCS-0N Cluster Output Memory Dump μarchitecture DB VMCS Validator Hierarchy Check M-Scanner VMCS1N VMCS-1N Cluster

The core of the Actaeon detection is based on finding out VMCS memory structures. VMCS is the memory structures that contains information for keeping the state of the system when it switches from Hypervisor to virtual machines and viceversa (not-root-mode/root-mode). VMCS bitmap fields set up which operations hypervisor will intercept during the system execution. VMCS fields are defined by the Intel manual but the Layout is micro-architectures dependent and it is not known a prior.

VMCS reverse engineering Layout By using the initialization hypervisor code (e.g. HyperDbg) we devise a reverse algorithm : Every field in the VMCS is associated with a 32 bits value, (encoding), that needs to be provided to the VMREAD/VMWRITE instructions to specify how the values has to be stored. Since the position (encoding) of the field is encapsulated into the instructions processor microcode in order to discover that, we fill the VMCS with some strings related to that field (typically numbers). Then we simply associate the encoding values utilized for filling a particular VMCS fields with the chosen numbers values and we can re-build the position of every fields in the VMCS memory structures.

DEMO:Reverse Engineering VMCS Layout

(VMCS Clustering) We base our search on some particular fields values defined inside the VMCS memory structure: Revision ID: It is the identifier that determines the layout of the rest of the structure. For the VMCS of the top hypervisor, this field has to match the value of the IA32 VMX BASIC MSR. VMX ABORT INDICATOR: This is the VMX abort indicator and its value has to be zero. The field is the second entry of the VMCS area. VmcsLinkPointerCheck: The values of this field consists of two consecutive words that, according to the Intel manual, should be set to 0xffffffff. Host CR4: This field contains the host CR4 register. Its 13th bit indicates if the VMX is enabled or not.

(VMCS Validation)

DEMO:

Most of the commodity hypervisors support nested virtualization, extracting the hierarchy of nested hypervisors could help an analyst to see what is running inside the system. KVM and Xen implement it using the Turtle approach, and a similar technique to multiplex the inner hypervisors VT-x/EPT is also used by VMware. By looking for the nested VMCS structure or by recognizing the VMCS of a Turtle-like environment, Actaeon can provide an extensible support to reconstruct the hierarchy of nested virtualization.

NESTED OS OS (L2) (L2) VMCS12 VMCS02 GUEST OS OS // NESTED HYPERVISOR (L1) (L1) VMCS01 HYPERVISOR // HOST (L0) (L0) HARDWARE

Virtualization Hierarchy Analysis We can infer the hierarchy between the hypervisors and distinguish between parallel and nested VMs by comparing the values of three fields: the GUEST CR3, the HOST CR3, and the HOST RIP. In a nested setup we can have two different hypervisors (represented by the two different HOST RIP addresses) while for parallel virtual machine the hypervisor is the same (same value of HOST RIP). By comparing the GUEST CR3 and HOST CR3 values we can distinguish among VMCS01, VMCS02, and VMCS12 in a nested virtualization setup.

Virtualization Hierarchy Analysis

DEMO: Nested Virtualization

EPT technology provides memory isolation among different virtual machines. It is marked with a dedicated flag in the Secondary Based Execution Control Field in the VMCS structure. EPT is a transparent hardware mechanism that basically provide another level of translation from virtual address of guest OS and the real physical memory page. The translation happens through different stages involving four EPT paging structures (namely PML4, PDPT, PD, and PT).

First of all we recognize and extract the EPT pointer inside the VMCS memory structure. Then we simulate the EPT translation by programmatic walking through the PML4, PDPT, PD, and PT tables for each address that need to be translated. We patch the core of Volatility, all the address translation functions, in order to have the chance to execute all the plugins without modifying the code.

DEMO:Extended Page Table (EPT)

Eurecom S3 Security Lab We present the basic background concepts about HW-assisted virtualization. We describe the internals of Actaeon as a forensic tool analyzer for virtual machine environment. We show a practical forensic analysis session on how to use Actaeon for analyzing virtual machine.

References & Contacts Actaeon won the 1st Volatility Plugin Contest - 2013/08 Prof. Balzarotti and Prof. Francillon e-mails: (davide.balzarotti@eurecom.fr,aurelien. francillon@eurecom.fr) Actaeon web page: http://s3.eurecom.fr/tools/actaeon/ Our lab web page: http://s3.eurecom.fr/ Authors/Speakers: Mariano Graziano (graziano@eurecom.fr) (@emd3l), Andrea Lanzi (lanzi@eurecom.fr)

Q&A Eurecom S3 Security Lab Thank You! Q&A?