Decompilation of Binary Programs Christina Cifuentes & K. John Gough School of Computing Science Queensland University of Technology Presented by Conny.

Slides:



Advertisements
Similar presentations
Decompilation of.NET bytecode Stephen Horne Trinity Hall 10 th February 2004 Computer Science Part II Project Progress Report
Advertisements

Northwestern University 2007 Winter – EECS 443 Advanced Operating Systems Exokernel: An Operating System Architecture for Application-Level Resource Management.
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
8. Code Generation. Generate executable code for a target machine that is a faithful representation of the semantics of the source code Depends not only.
Systems Software.
COE Computer Organization & Assembly Language
CPSC Compiler Tutorial 9 Review of Compiler.
Telescoping Languages: A Compiler Strategy for Implementation of High-Level Domain-Specific Programming Systems Ken Kennedy Rice University.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Data Structure and Algorithm 1 Yingcai Xiao. You Me The Course (
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Partial Automation of an Integration Reverse Engineering Environment of Binary Code Author : Cristina Cifuentes Reverse Engineering, 1996., Proceedings.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Types of software. Sonam Dema..
Introduction to High-Level Language Programming
Introduction 01_intro.ppt
Chapter 17 Programming Tools The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
Secure Virtual Architecture John Criswell, Arushi Aggarwal, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve University of Illinois at Urbana-Champaign.
University of Maryland Compiler-Assisted Binary Parsing Tugrul Ince PD Week – 27 March 2012.
High-level Languages.
INTRODUCTION TO COMPUTING CHAPTER NO. 06. Compilers and Language Translation Introduction The Compilation Process Phase 1 – Lexical Analysis Phase 2 –
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
CS266 Software Reverse Engineering (SRE) Reversing and Patching Java Bytecode Teodoro (Ted) Cipresso,
Python From the book “Think Python”
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Compilers for Embedded Systems Ram, Vasanth, and VJ Instructor : Dr. Edwin Sha Synthesis and Optimization of High-Performance Systems.
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.
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Overview of Compilers and JikesRVM John.
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.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Winter Compilers Software Eng. Dept. – Ort Braude Compiling Assignments and Expressions Lecturer: Esti Stein brd4.ort.org.il/~esti2.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1: Introduction 1 Compiler Designs and Constructions Chapter 1: Introduction Objectives: Course Objectives Introduction Dr. Mohsen Chitsaz.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
Introduction to OOP CPS235: Introduction.
Software Development Introduction
Introduction to Language Programming Hierarchy of programming lang. Based on machine independences: 1. Machine language 2. Assembly language 3. Higher.
CSC 4181 Compiler Construction
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Introduction  Program: Set of sequence instruction that tell the computer what to do.  Software: A collection of programs, data, and information. 
ICS312 Introduction to Compilers Set 23. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
Compilers and Interpreters
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Contents What is Reverse Engineering (RE)? Why do we need Reverse Engineering? Scope and Tasks of Reverse Engineering Reverse Engineering Tools Reverse.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
What Do Compilers Do 1 A compiler acts as a translator, transforming human-oriented programming languages into computer-oriented machine languages. Ignore.
Introduction To Software Development Environment.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Compiler Design (40-414) Main Text Book:
PRINCIPLES OF COMPILER DESIGN
Introduction to Compiler Construction
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Programming Language Hierarchy, Phases of a Java Program
Software Maintenance.
Chapter 1: Introduction to Compiling (Cont.)
Introduction to System Programming
Mobile Development Workshop
CISC 7120X Programming Languages and Compilers
Compiler Construction
Programming language translators
Presentation transcript:

Decompilation of Binary Programs Christina Cifuentes & K. John Gough School of Computing Science Queensland University of Technology Presented by Conny Chan

Overview Usage of decompiler Phases of the decompiler Front-end, UDM, Back-end The decompiling system Signature generator Conclusion Discussion

Perform inverse process of a compiler Usage: Maintenance of Code Lost code recovery Migration of application to new HW platform. Translation of the obsolete code into new code. Software Security Malicious code detection Reverse Compiler Binary codeHLL program

Note in advance: Decompiler in this article: Experimental decompiler for the DOS OS Intel i80286 architecture Read.com and.exe files Produce C programs as output.

Decompiler Structure Binary Program Front-end (machine dependent) UDM (analysis) Back-end (language dependent) HLL program

The Front-end Binary Program Virtual Memory LoaderParser 1. Low-level Intermediate code 2. Control flow graph Semantic Analysis

The Semantic Analysis Performs idiom analysis e.g. type propagation. E.g. long variable found at –1 to –4. neg dx neg ax sbb dx, 0 neg dx:ax [bp-2] … [bp-4] merged[bp-2]:[bp-4]

The Universal Decompiling Machine (UDM) 1. Low-level Intermediate code 2. Control flow graph UDM Data Flow Analysis Control Flow Analysis 1. High-level Intermediate code 2. Structured control flow graph

The Back-end 1. High-level Intermediate code 2. Structured control flow graph Restructuring HLL Code Generation HLL Program

The HLL code generation Defines: Global variables Emits code for each function In each function: Comments of such procedures Variables and procedures named in loc1, proc2, etc.

The Decompiling System Decompiler (dcc) Signature Generator (dccSign)

Signature Database Signature Generator (dccSign) Signature Database Compiler Signatures Library Signatures Decompiler (dcc) Extract Signatures e.g. printf(), scanf() If a library function matched, replaced by the library name instead of analyzed by dcc.

Signatures Library Signature A series of instructions that identifies library function for a compiler. Compiler Signature A series of instructions that identifies a particular version of a compiler.

Signature Checker Determined if known compiler is used. Check first n bytes of instructions with pattern-matching Decompiler (dcc) Signature Checker

Conclusion Present one way for decompiling binary program. Prove the feasibility of writing a decompiler for a contemporary machine architecture.

Discussion Is decompilation legal?