Gogul Balakrishnan, Radu Gruian and Thomas Reps Computer Science Dept., Univ. of Wisconsin GrammaTech, Inc. April, 2005 CodeSurfer / x86 A Platform for.

Slides:



Advertisements
Similar presentations
ANALYSIS OF PROG. LANG. PROGRAM ANALYSIS Instructors: Crista Lopes Copyright © Instructors. 1.
Advertisements

Intermediate Code Generation
1 Program Slicing Purvi Patel. 2 Contents Introduction What is program slicing? Principle of dependences Variants of program slicing Slicing classifications.
Assembly Code Verification Using Model Checking Hao XIAO Singapore University of Technology and Design.
Semantic analysis Parsing only verifies that the program consists of tokens arranged in a syntactically-valid combination, we now move on to semantic analysis,
Model Checking x86 Executables with CodeSurfer/x86 and WPDS++ G. Balakrishnan 1, T. Reps 1,2, N. Kidd 1, A. Lal 1, J. Lim 1, D. Melski 2, R. Gruian 2,
Run-Time Storage Organization
Run time vs. Compile time
Compiler Summary Mooly Sagiv html://
Topic 6 -Code Generation Dr. William A. Maniatty Assistant Prof. Dept. of Computer Science University At Albany CSI 511 Programming Languages and Systems.
Partial Automation of an Integration Reverse Engineering Environment of Binary Code Author : Cristina Cifuentes Reverse Engineering, 1996., Proceedings.
1 Run time vs. Compile time The compiler must generate code to handle issues that arise at run time Representation of various data types Procedure linkage.
Compiler Construction A Compulsory Module for Students in Computer Science Department Faculty of IT / Al – Al Bayt University Second Semester 2008/2009.
Strategies to relate the program and problem domains using code instrumentation Mario Marcelo Berón University of Minho Pedro Rangel Henriques University.
CS102 Introduction to Computer Programming
Effective C# 50 Specific Way to Improve Your C# Item 50 Scott68.Chang.
Previous Next 06/18/2000Shanghai Jiaotong Univ. Computer Science & Engineering Dept. C+J Software Architecture Shanghai Jiaotong University Author: Lu,
AutoHacking with Phoenix Enabled Data Flow Analysis Richard Johnson |
Course Revision Contents  Compilers  Compilers Vs Interpreters  Structure of Compiler  Compilation Phases  Compiler Construction Tools  A Simple.
Module 1: Introduction to C# Module 2: Variables and Data Types
Recovery of Variables and Heap Structure in x86 Executables Gogul Balakrishnan Thomas Reps University of Wisconsin.
University of Maryland Compiler-Assisted Binary Parsing Tugrul Ince PD Week – 27 March 2012.
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
Data Structures Winter What is a Data Structure? A data structure is a method of organizing data. The study of data structures is particularly important.
CMSC 345 Fall 2000 Unit Testing. The testing process.
CSC 480 Software Engineering Lecture 14 Oct 16, 2002.
Department of Computer Science A Static Program Analyzer to increase software reuse Ramakrishnan Venkitaraman and Gopal Gupta.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Johnson Space Center SAS05_CodeSurfer_Infusion_JSC_Markovich S&MA Directorate Can CodeSurfer Increase Code Inspection Efficiency? A Research Infusion Project.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
1 Program Slicing Amir Saeidi PhD Student UTRECHT UNIVERSITY.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
Execution of an instruction
Analyzing Memory Accesses in Obfuscated x86 Executables Michael Venable Mohamed R. Choucane Md. Enamul Karim Arun Lakhotia (Presenter) DIMVA 2005 Wien.
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Buffer Overflow Proofing of Code Binaries By Ramya Reguramalingam Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Overview of Previous Lesson(s) Over View  A program must be translated into a form in which it can be executed by a computer.  The software systems.
Chapter 1 Introduction Study Goals: Master: the phases of a compiler Understand: what is a compiler Know: interpreter,compiler structure.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
Chapter 1 Introduction Major Data Structures in Compiler
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
1 Control Flow Analysis Topic today Representation and Analysis Paper (Sections 1, 2) For next class: Read Representation and Analysis Paper (Section 3)
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
Analyzing Stripped Device-Driver Executables Gogul Balakrishnan 1 Thomas Reps 2 1 NEC Laboratories America 2 University of Wisconsin (Work done at University.
CS412/413 Introduction to Compilers Radu Rugina Lecture 18: Control Flow Graphs 29 Feb 02.
A computer contains two major sets of tools, software and hardware. Software is generally divided into Systems software and Applications software. Systems.
Dr. Mohamed Ramadan Saady 314ALL CH1.1 Chapter 1: Introduction to Compiling.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
Computer Organization Instructions Language of The Computer (MIPS) 2.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Analyzing Memory Accesses in x86 Executables Gogul Balakrishnan Thomas Reps University of Wisconsin.
Gogul Balakrishnan Thomas Reps University of Wisconsin Analyzing Memory Accesses in x86 Executables.
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Prologue Sung-Dong Kim, Dept. of Computer Engineering, Hansung University.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Chapter 1 Introduction Samuel College of Computer Science & Technology Harbin Engineering University.
Chapter 1 Introduction.
Introduction to Programming and Visual Basic
CSCI-235 Micro-Computer Applications
Lecture 1: Introduction to JAVA
Compiler Construction (CS-636)
SOFTWARE DESIGN AND ARCHITECTURE
Chapter 1 Introduction.
An Overview to Compiler Design
Program Slicing Baishakhi Ray University of Virginia
Embedded System Development Lecture 13 4/11/2007
HW2: A prime path generator (Due Oct 6th 23:59)
Run-time environments
Presentation transcript:

Gogul Balakrishnan, Radu Gruian and Thomas Reps Computer Science Dept., Univ. of Wisconsin GrammaTech, Inc. April, 2005 CodeSurfer / x86 A Platform for Analyzing x86 Executables 1

Contents Introduction CodeSurfer / x86 Architecture CodeSurfer / x86 Facilities CodeSurfer / x86 Limitations Recent Work 2

Introduction 3 Motivation Ensuring that 3 rd -party applications do not perform malicious operations Issues Symbol-table and debugging information is either absent No abstract location information (variables) Existing binary analysis tools are not capable of dealing with these issues

Introduction 4 CodeSurfer Program analysis and inspection tool Programming API is bundled with the CodeSurfer programmable package

Introduction IDAPro Powerful and commercial disassemby toolkit Provide APIs for its internal plug-ins 5

Introduction 6 CodeSurfer / x86 Prototype system for analyzing x86 executables Combine Value-Set Analysis(VSA) with facilities provided by the IDAPro and CodeSurfer toolkits Recover Intermediate Representations(IR) of programs using VSA Provide a platform for investigating the properties and behaviors of potentially malicious code

CodeSurfer / x86 Architecture 7 Overall Architecture

CodeSurfer / x86 Architecture 8 Value-set Analysis(VSA) Purpose Over-approximate possible range of values at each program point each memory Location(registers, stack...) might store Description Separate address space into a set of disjoint areas Memory Locations are represented as a-locs Ex) EAX -> ( ㅗ, 4[0, 1]-20, ㅜ ) means that EAX may not contain any meaningful value in Global Environment, may have value 4 * [0, 1] – 20 + ESP in some Local Environment and be able to have any value in some other Local Environment

CodeSurfer / x86 Architecture 9 IDAPro Input x86 Executable Process Disassemble x86 binary executable Analyze static information Output Assembly code Control Flow Graphs(CFGs) Procedure boundaries Statically known memory addresses and offsets

CodeSurfer / x86 Architecture 10 Connector – Parsing Process Parse input data into connector’s data structures for VSA Output Parsed Data which keeps whole information intact

CodeSurfer / x86 Architecture 11 Connector – Abstraction Process Value-set Analysis – a-locs Output Parsed Data with Abstract Information including a-locs with value-sets

CodeSurfer / x86 Architecture 12 Connector – Augmentation Process Augment incomplete(indirect jumps, indirect calls) call graph and CFGs using each program point’s a-locs and value-sets Output Code Surfer compatible format data(IRs)

CodeSurfer / x86 Architecture 13 CodeSurfer Input Code Surfer compatible format Data Output Collection of IRs, consisting of Abstract Syntax Tree, CFGs, call graph, System Dependence Graph(SDG)

CodeSurfer / x86 Architecture 14 Overall Architecture (revisit)

CodeSurfer / x86 Facilities 15 Standard Compilation Model Check Checkpoints Runtime Stack Self-modification Separation of Program’s Data If it cannot be confirmed that the executable conforms to the model, then the IR is possibly incorrect

CodeSurfer / x86 Facilities 16 CodeSurfer’s GUI SDG Browser CodeSurfer’s API Access lower-level information individual nodes and edges of the program’s SDG Call graph CFGs Conjunction with GrammaTech’s Path Inspector Detect possibly problematic paths

CodeSurfer / x86 Limitations 17 Limitations Dynamically Determined Information IDAPro and VSA cannot fully recover dynamically determined information such as heap-allocated data, indirect calls, and indirect jumps Complex Data Structure Recover only very coarse information about arrays Value-sets are only suitable for congruence, contiguous data structure

Recent Work 18