Fine-grained covert debugging using hypervisors and analysis via visualization



Similar documents
Reverse Engineering by Crayon: Game Changing Hypervisor and Visualization Analysis

for Malware Analysis Daniel Quist Lorie Liebrock New Mexico Tech Los Alamos National Laboratory

Visualizing Compiled Executables for Malware Analysis

Attacking Obfuscated Code with IDA Pro. Chris Eagle

Adi Hayon Tomer Teller

Denial-of-Service Attacks on Host-Based Generic Unpackers

File Disinfection Framework (FDF) Striking back at polymorphic viruses

Peeking into Pandora s Bochs. Instrumenting a Full System Emulator to Analyse Malicious Software

Storm Worm & Botnet Analysis

Virtual machines and operating systems

Compromise-as-a-Service

Detecting the Presence of Virtual Machines Using the Local Data Table

CERIAS Tech Report Basic Dynamic Processes Analysis of Malware in Hypervisors Type I & II by Ibrahim Waziri Jr, Sam Liles Center for Education

PE Explorer. Heaventools. Malware Code Analysis Made Easy

FRONT FLYLEAF PAGE. This page has been intentionally left blank

PRACTICAL MALWARE ANALYSIS Kris Kendall

Parasitics: The Next Generation. Vitaly Zaytsev Abhishek Karnik Joshua Phillips

LASTLINE WHITEPAPER. In-Depth Analysis of Malware

Melde- und Analysestelle Informationssicherung MELANI Torpig/Mebroot Reverse Code Engineering (RCE)

So You Want To Analyze Malware? Tools, Techniques, and Mindset

ESET Endpoint Security 6 ESET Endpoint Antivirus 6 for Windows

TitanMist: Your First Step to Reversing Nirvana TitanMist. mist.reversinglabs.com

x86 ISA Modifications to support Virtual Machines

The QEMU/KVM Hypervisor

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

Hypervisor-Based, Hardware-Assisted System Monitoring

Effective Java Programming. efficient software development

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

Dongwoo Kim : Hyeon-jeong Lee s Husband

Detecting the One Percent: Advanced Targeted Malware Detection

FATKit: A Framework for the Extraction and Analysis of Digital Forensic Data from Volatile System Memory p.1/11

Bluepilling the Xen Hypervisor

Securing Your Cloud with Xen Project s Advanced Security Features

System Structures. Services Interface Structure

Security Intelligence Services. Cybersecurity training.

Lecture 26: Obfuscation

Spyware Analysis. Security Event - April 28, 2004 Page 1

Virtualization. Explain how today s virtualization movement is actually a reinvention

Practical Threat Intelligence. with Bromium LAVA

Subverting the Xen hypervisor

Static Analysis of Virtualization- Obfuscated Binaries

Hotpatching and the Rise of Third-Party Patches

Dynamic analysis of malicious code

Software Reversing Engineering (a.k.a. Reversing) Spiros Mancoridis. What is Reverse Engineering? Software Reverse Engineering: Reversing

2) Xen Hypervisor 3) UEC

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code

Self Protection Techniques in Malware

IOS110. Virtualization 5/27/2014 1

Virtualization Technologies (ENCS 691K Chapter 3)

Intel Application Software Development Tool Suite 2.2 for Intel Atom processor. In-Depth

Bug hunting. Vulnerability finding methods in Windows 32 environments compared. FX of Phenoelit

Evading Android Emulator

Sandy. The Malicious Exploit Analysis. Static Analysis and Dynamic exploit analysis. Garage4Hackers

Virtualization. Pradipta De

Getting Ahead of Malware

Hypervisor Memory Forensics

Full Potential of Dynamic Binary Translation for AV Emulation Engine

Under the Hood: How Actaeon Unveils Your Hypervisor

Machine Virtualization: Efficient Hypervisors, Stealthy Malware

Malware: Prevenire (e curare) con strumenti open-source

Peeking into Pandora's Bochs { Instrumenting a Full System Emulator to Analyse Malicious Software

Security Challenges in Virtualized Environments

matasano Hardware Virtualization Rootkits Dino A. Dai Zovi

This is DEEPerent: Tracking App behaviors with (Nothing changed) phone for Evasive android malware

Basics of Virtualisation

CHAPTER 2 THEORETICAL FOUNDATION

Operating System Structures

13.1 Backup virtual machines running on VMware ESXi / ESX Server

CS 695 Topics in Virtualization and Cloud Computing. Introduction

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

Virtualization. Types of Interfaces

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

COS 318: Operating Systems. Virtual Machine Monitors

McAfee MOVE / VMware Collaboration Best Practices

Format string exploitation on windows Using Immunity Debugger / Python. By Abysssec Inc

Chapter 14 Analyzing Network Traffic. Ed Crowley

Abstract. 1. Introduction. 2. Threat Model

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Frontiers in Cyber Security: Beyond the OS

Chapter 2 Addendum (More on Virtualization)

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

Code Injection From the Hypervisor: Removing the need for in-guest agents. Matt Conover & Tzi-cker Chiueh Core Research Group, Symantec Research Labs

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

Introducing Ring -3 Rootkits

A Survey on Virtual Machine Security

Inside a killer IMBot. Wei Ming Khoo University of Cambridge 19 Nov 2010

Hypervisors and Virtual Machines

Architecture of the Kernel-based Virtual Machine (KVM)

Survey on virtual machine security

Full and Para Virtualization

Achieving business benefits through automated software testing. By Dr. Mike Bartley, Founder and CEO, TVS

A lap around Team Foundation Server 2015 en Visual Studio 2015

Virtual Switching Without a Hypervisor for a More Secure Cloud

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

Transcription:

Reverse Engineering by Crayon: Game Changing Hypervisor and Visualization Analysis Fine-grained covert debugging using hypervisors and analysis via visualization Daniel A. Quist Lorie M. Liebrock Offensive Computing, LLC New Mexico Tech Defcon 17 Las Vegas, NV

Introduction Reverse Engineering g is Hard! Hypervisor based executable monitoring Modifications for improved performance Visualization tool for rapid analysis Modifying the reverse engineering process

Difficulties of RE Time consuming gprocess Difficult set of skills to acquire Tools are advanced, but still don t provide adequate views. Focused on static analysis Software armoring makes process even more difficult

Process for Reverse Engineering Setup an isolated run-time environment Execution and initial analysis Deobfuscate compressed or packed code Disassembly / Code-level Analysis Identify and analyze relevant and interesting portions of the program

Isolated Analysis Environment Setup an Isolated Runtime Environment Virtual machines: VMWare, Xen, KVM, Need to protect yourself ffrom malicious code Create a known-good baseline environment Quickly allows backtracking if something bad happens

Execution and Initial Analysis Goal: Quickly figure out what the program is doing without looking at assembly Look for: Changes to the file system Changes to the behavior of the system Network traffic Overall performance Ads or changed browser settings

Remove Software Armoring Program protections to prevent reverse engineering Done via packers Small encoder/decoder Self-modifying code Lots of research about this OllyBonE, Saffron, Polyunpack, Renovo, Ether, Azure My research uses Ether

Packing and Encryption Self-modifying code Small decoder stub Decompress the main executable Restore imports Play tricks with the executable OS Loader is inherently lazy (efficient) Hide the imports Obscure relocations Use bogus values for various unimportant fields

Software Armoring Compressed, obfuscated, hidden code Virtual machine detection Debugger detection Shifting decode frames

Normal PE File

Packed PE File

Troublesome Protections Virtual Machine Detection Redpill, ocvmdetect, Paul Ferrie s paper Debugger Detection IsDebuggerPresent() EFLAGS bitmask Timing Attacks Analyze value of RDTSC before and after Really effective

Thwarting Protections Two methods for circumvention 1. Know about all the protections before hand and disable them 2. Make yourself invisible

Virtual Machine Monitoring Soft VM Based systems Renovo Polyunpack Zynamics Bochs unpacker Problems Detection of virtual machines is easy Intel CPU never traditionally designed for virtualization Do not emulate x86 bug-for-bug

OS Integrated Monitoring Saffron, OllyBonE Page-fault handler based debugger Abuses the supervisor bit on memory pages High-level executions per page Problems Destabilizes the system Need dedicated hardware Fine-grain monitoring not possible

Fully Hardware Virtualizations Ether: A. Dinaburg, P. Royal Xen based hypervisor system Base functions for monitoring System calls Instruction traces Memory Writes All interactions done by memory page mapping Problems Unpacking code primitive Dumps mangled and not possible to dissassemble Old version of Xen hypervisor

Disassembly and Code Analysis Most nebulous portion of the process Largely depends on intuition Example: When we reversed the MP3 Cutter and MIRC programs Takes time and experience Looking at assembly is tedious Suffers from not seeing the forest from the trees syndrome Analyst fatigue Level of attention required yields few results

Find Interesting and Relevant Portions of the Executable Like disassembly, this relies on a lot of intuition and experience Typical starting points: Look for interesting strings Look for API calls Examine the interaction with the OS This portion is fundamentally imprecise, tedious, and often frustrating for beginners and experts

Contributions Modifications to Ether Improve malware unpacking Enable advanced tracing mechanisms Automate much of the tedious portions Visualizing Execution for Reversing and Analysis (VERA) Speed up disassembly and finding interesting portions of an executable Faster identification of the Original Entry Point

Ether System Architecture

Extensions to Ether Removed unpacking code from hypervisor into userspace Better user mode analysis PE Repair system Allows for disassembly of executables Added enhanced monitoring system for executables

Results Close to a truly covert analysis system Ether is nearly invisible Still subject to bluepill detections Fine-grain resolution of program execution Application memory monitoring and full analysis capabilities Dumps from Ether can now be loaded in IDA Pro without modification

Open Problems Unpacking process produces lots of candidate dump files Need to figure out what the OEP is Import rebuilding is still an issue Now that t there is a nice tool for tracing programs covertly, we need to do analysis

Visualization of Trace Data Goals: Quickly visually subvert software armoring Identify modules of the program Initialization Main loops End of unpacking code Figure out where the self-modifying code ends (OEP detection) Discover dynamic runtime program behavior Integrate with existing tools

Visualizing the OEP Problem Each block (vertex) represents a basic block executed in the user mode code Each line represents a transition The thicker the line, the more it was executed Colors represent areas of memory execution

VERA Visualization of Executables for Reversing and Analysis Windows MFC Application Integrates with IDA Pro Fast, small memory footprint

VERA Architecture

Visualizing Packers Memory regions marked for PE heuristics

Demo!

Netbull Virus (Not Packed)

Netbull Zoomed View

Visualizing Packers Memory regions marked for PE heuristics

UPX

UPX - OEP

ASPack

FSG

MEW

TeLock

Future Work General GUI / bug fixes Integration with IDA Pro Memory access visualization System call integration Function boundaries Interactivity with unpacking process Modify hypervisor to work with WinDBG, OllyDbg, IDA Debugger

Conclusions Visualizations make it easy to identify the OEP No statistical analysis of data needed Program phases readily identified Graphs are relatively simple Preliminary user study shows tool holds promise for speeding up reverse engineering

Questions? These slides are out of date! Find the latest ones at: http://www.offensivecomputing.net/