Full Potential of Dynamic Binary Translation for AV Emulation Engine



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

Virtualization. Pradipta De

Full and Para Virtualization

LASTLINE WHITEPAPER. In-Depth Analysis of Malware

How Java Software Solutions Outperform Hardware Accelerators

Jonathan Worthington Scarborough Linux User Group

Virtualization Technologies

Virtualization. Clothing the Wolf in Wool. Wednesday, April 17, 13

Cloud Computing. Up until now

Virtual machines and operating systems

Virtual Machines. Virtual Machines

Cloud Computing #6 - Virtualization

Fine-grained covert debugging using hypervisors and analysis via visualization

Evading Android Emulator

Chapter 5 Cloud Resource Virtualization

CSCI E 98: Managed Environments for the Execution of Programs

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

OS Virtualization Frank Hofmann

Suh yun Ki m (KIS T) (KIS suhyunk@.com

Virtual Machines. COMP 3361: Operating Systems I Winter

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers

Introduction to Virtual Machines

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

Parrot in a Nutshell. Dan Sugalski dan@sidhe.org. Parrot in a nutshell 1

A GENERIC PURPOSE, CROSS-PLATFORM, HIGH EXTENSIBLE VIRTUAL MACHINE. John Vlachoyiannis

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

x86 ISA Modifications to support Virtual Machines

1. Overview of the Java Language

System Structures. Services Interface Structure

A Unified View of Virtual Machines

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

Windows Server Performance Monitoring

Introduction to Virtual Machines

Virtual Machine Learning: Thinking Like a Computer Architect

CS 152 Computer Architecture and Engineering. Lecture 22: Virtual Machines

The Design of the Inferno Virtual Machine. Introduction

İSTANBUL AYDIN UNIVERSITY

Wiggins/Redstone: An On-line Program Specializer

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

Return-oriented programming without returns

IO Visor Project Overview

OS Virtualization. CSC 456 Final Presentation Brandon D. Shroyer

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Automatic Logging of Operating System Effects to Guide Application-Level Architecture Simulation

VMkit A lightweight hypervisor library for Barrelfish

File Disinfection Framework (FDF) Striking back at polymorphic viruses

1/20/2016 INTRODUCTION

Architecture of the Kernel-based Virtual Machine (KVM)

DATA PROTECTION IN A VIRTUALIZED ENVIRONMENT - ISSUES AND SOLUTIONS

Reverse Engineering by Crayon: Game Changing Hypervisor and Visualization Analysis

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

Self Protection Techniques in Malware


Obfuscation: know your enemy

Virtualization. Jukka K. Nurminen

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

General Introduction

COS 318: Operating Systems. Virtual Machine Monitors

Chapter 1 Fundamentals of Java Programming

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Installing ModelRisk on Macintosh A quick start guide. Vose Software

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

Cloud Computing CS

IBM RealSecure Server Sensor System Requirements

CS5460: Operating Systems

CAS : A FRAMEWORK OF ONLINE DETECTING ADVANCE MALWARE FAMILIES FOR CLOUD-BASED SECURITY

Detecting the One Percent: Advanced Targeted Malware Detection

Full System Emulation:

COS 318: Operating Systems

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

Hypervisor Support for Identifying Covertly Executing Binaries

Stacey D. Son Consultant/SRI International. BSDCan Developer s Summit 15-May-2013

Detecting the Presence of Virtual Machines Using the Local Data Table

The Xen of Virtualization

Virtualization Technology. Zhiming Shen

High-speed image processing algorithms using MMX hardware

Harnessing Intelligence from Malware Repositories

The Plan Today... System Calls and API's Basics of OS design Virtual Machines

VMware Backup and Deduplication. Written by: Anton Gostev Product Manager Veeam Software

Benchmarking Hadoop & HBase on Violin

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

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Practice #3: Receive, Process and Transmit

Virtual Machines. Virtualization

Virtualization. Jia Rao Assistant Professor in CS

Learn the fundamentals of Software Development and Hacking of the iphone Operating System.

Some Future Challenges of Binary Translation. Kemal Ebcioglu IBM T.J. Watson Research Center

Sage Intergy 6.10 Architecture Guide

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

QEMU, a Fast and Portable Dynamic Translator

Kaspersky Security. for Virtualization 1.1 and Trend Micro Deep. Security 8.0 virtual environment detection rate and performance testing by AV-Test

Attacking Obfuscated Code with IDA Pro. Chris Eagle

WHITE PAPER Optimizing Virtual Platform Disk Performance

End to End Security do Endpoint ao Datacenter

Virtualization. Types of Interfaces

Basics of Virtualisation

Copyright 1

Clouds, Virtualization and Security or Look Out Below

Transcription:

www.iss.net Full Potential of Dynamic Binary Translation for AV Emulation Engine VB Conference (Oct 12, 2006) Jim Wu ISS X-Force

Agenda Roles of emulation in AV Survey of software emulation technologies Dynamic binary translation (DBT), demystified Unique challenges and opportunities of DBT for AV The road ahead

Roles of emulation in AV Generic unpacker for unknown or modified packers. Detection of polymorphic malware. Behavioral AVs for zero-day detection. An essential weapon in an AV arsenal

Survey of Software Emulation Technologies Interpretation: fetch-decode-execute for each instruction. Example: SimpleScalar Based on the instruction set manual.

Survey of Software Emulation Technologies

Survey of Software Emulation Technologies Interpretation: fetch-decode-execution for each instruction. Example: SimpleScalar Based on the instruction set manual Advantage: portable Disadvantage: slowest (100x slower)

Survey of Software Emulation Technologies (Con t) Dynamic Binary Translation (DBT): Translation in the runtime Execution of the generated code. Examples: JIT compilers, Embra. Translated code for AAA : Load_state->AAA-> save_state Advantage: faster for loops Disadvantage: not portable

Survey of Software Emulation Technologies (Con t) Direct execution: Set up a safe environment to run the sample directly. Example: most Ring3 code in VMware New VM hardware allows the classical trap-and-emulate virtualization. Advantage: fastest, up to native speed Disadvantage: difficult to interact

Survey of Software Emulation Technologies (Con t) Current status in AV: Emulation technology in AV is leaping from interpretation to DBT. Need to get more out of DBT Example: packed samples in Wildcore Currently AV engines have to use heuristics to run less instructions.

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

Dynamic binary translation (DBT), demystified Dispatch Loop Instruction in TC? Translate & Write to TC End of Block? Run Blocks

DBT, demystified (Con t) Translation Unit: Simple/repeatable for most instructions Example: add edx, ecx TRANS_M2R(MOV, EBX, &(regs->ecx)); TRANS_R2M(ADD, &(regs->edx), EBX); write 01 1D xxxxxxxx to TC MERGE_EFLAGS(); Dispatch Loop Instruction in TC? N Translate & Write to TC Y End of Block? Y N Run Blocks

DBT, demystified (Con t) Exceed Segment Limit? Access Violation Typical memory design: (0 + 0 + 30)/3 = 10 Hit a Breakpoint? Breakpoint Exception Four read/write checks: Split Page Access? Split Page Access Segment limit, HW breakpoint, split page access? Real Memory Allocated? Allocate Real Memory for this Virtual Page Real memory allocated? Page Writable? For Memory Write Access Violation Two write-specific checks: Writable? Self-modifying-code? Self-Modifying Code? Flush Translated Block or Page Access Memory

DBT, demystified (Con t) Exceed Segment Limit? Access Violation Improved memory design -- method #1 Skip segment limit check if the segment is flat. Hardware breakpoint becomes page based. Hit a Breakpoint? Split Page Access? Real Memory Allocated? Page Writable? Breakpoint Exception Split Page Access Allocate Real Memory for this Virtual Page For Memory Write Access Violation Self-Modifying Code? Flush Translated Block or Page Access Memory

DBT, demystified (Con t) Exceed Segment Limit? Access Violation Improved memory design method #2 Hit a Breakpoint? Breakpoint Exception Allocate reserved memory to avoid split page access. Split Page Access? Real Memory Allocated? Split Page Access Allocate Real Memory for this Virtual Page Use real exception if memory isn t committed Page Writable? For Memory Write Access Violation Self-Modifying Code? Flush Translated Block or Page Access Memory

DBT, demystified (Con t) Exceed Segment Limit? Access Violation Improved memory design method #3 Use hardware protection instead of insertion of explicit address checks. Require Ring0 programming. Provide the best of DBT and direct execution. Hit a Breakpoint? Split Page Access? Real Memory Allocated? Page Writable? Self-Modifying Code? Breakpoint Exception Split Page Access Allocate Real Memory for this Virtual Page For Memory Write Access Violation Flush Translated Block or Page Access Memory

DBT, demystified (Con t) Exceed Segment Limit? Access Violation Self-modifying code Write to translated code Entry in TC becomes stale: Flash the whole TC Flash the block Complicate SMC check Flash the page Simplify SMC check Hit a Breakpoint? Split Page Access? Real Memory Allocated? Page Writable? Self-Modifying Code? Breakpoint Exception Split Page Access Allocate Real Memory for this Virtual Page For Memory Write Access Violation Flush Translated Block or Page Access Memory

Unique challenges and opportunities of DBT for AV Translation time can t be the bottleneck Some optimizations might not worth the effort. Translation might cause SMC on host machine. Build DBT on top of the interpreter: Allow quick proof-of-concept of DBT. Pack some large executables with UPX. Just translate the UPX unpacking code in POC. Only translate frequent loops. Knowledge of the current state during translation.

The road ahead Continue the transition from interpretation to DBT. Continue to squeeze more out of DBT. Explore the impact of hardware virtualization for emulation in AV. More research and collaboration in emulation.

Questions? Thank you! Jim Wu, ISS X-Force jwu@iss.net or jywuca@yahoo.com