Java 6 Decompiler Joshua Cranmer

Slides:



Advertisements
Similar presentations
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Inside an XSLT Processor Michael Kay, ICL 19 May 2000.
Message Simplification Making Version 3 as easy to implement as Version 2 – but with sound semantics
Ditto: Speeding Up Runtime Data Structure Invariant Checks AJ Shankar and Ras Bodik UC Berkeley.
Control Structures Ranga Rodrigo. Control Structures in Brief C++ or JavaEiffel if-elseif-elseif-else-end caseinspect for, while, do-whilefrom-until-loop-end.
Semantics Static semantics Dynamic semantics attribute grammars
8. Static Single Assignment Form Marcus Denker. © Marcus Denker SSA Roadmap  Static Single Assignment Form (SSA)  Converting to SSA Form  Examples.
V Storage Manager Shahram Ghandeharizadeh Computer Science Department University of Southern California.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
METHOD OVERRIDING Sub class can override the methods defined by the super class. Overridden Methods in the sub classes should have same name, same signature.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 63 – Manipulating Data Using Methods – Day 2.
CS0004: Introduction to Programming Repetition – Do Loops.
CSE Winter 2008 Introduction to Program Verification symbolic execution continued.
JVM-1 Java Virtual Machine Reading Assignment: Chapter 1: All Chapter 3: Sections.
JETT 2003 Java.compareTo(C++). JAVA Java Platform consists of 4 parts: –Java Language –Java API –Java class format –Java Virtual Machine.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Logical Operators Java provides two binary logical operators (&& and ||) that are used to combine boolean expressions. Java also provides one unary (!)
1 Fall 2008ACS-1903 for Loop Reading files String conversions Random class.
Schedule Midterm out tomorrow, due by next Monday Final during finals week Project updates next week.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
Introduction To PHP 20 * Introducing the basics of programming * Discovering variables, loops, arrays and conditions * Integrating HTML and PHP Stations.
1 The Java Virtual Machine Yearly Programming Project.
CSC 213 – Large Scale Programming. Why Do We Test?
Krakatoa: Decompilation in Java “Does Bytecode Reveal Source?” Todd A. Proebsting Scott A. Watterson The University of Arizona Presented by Karl von Randow.
Chapter 5: Control Structures II (Repetition)
Chapter 7 Advanced SQL Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
Introduction to Java University of Sunderland CSE301 Harry R. Erwin, PhD.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
CSS446 Spring 2014 Nan Wang.  To be able to declare and use interface types  To appreciate how interfaces can be used to decouple classes  To learn.
Iterative Constructs Review l What are named constants? Why are they needed? l What is a block? What is special about declaring a variable inside a block?
CS 363 Comparative Programming Languages Semantics.
Mr. Dave Clausen1 La Cañada High School Chapter 6: Repetition Statements.
A First Simple Program /* This is a simple Java program. Call this file "Example.java".*/ class Example { // Your program begins with a call to main().
1 Visual Studio.NET.NET as a Teaching Tool John D. Haney John M. Lovely Northern Arizona University College of Business Administration.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse debugger.
332 Final Review Last updated Fall 2013 Professor Ammann.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Java Basics.  To checkout, use: svn co scb07f12/UTORid  Before starting coding always use: svn update.
Introduction to Java COM379 (Part-Time) University of Sunderland Harry R Erwin, PhD.
Comparing Java and.Net Security: Lessons Learned and Missed - Nathanael Paul, David Evans Presented by Dan Frohlich.
29 th October 2003 Checking Secure Interactions of Smart Card Applets: extended version P. Bieber, J. Cazin, P. Girard, J. –L. Lanet, V. Wiels, and G.
TAKE – A Derivation Rule Compiler for Java Jens Dietrich, Massey University Jochen Hiller, TopLogic Bastian Schenke, BTU Cottbus/REWERSE.
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.
CSCI 212 Object-Oriented Programming in Java. Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Compilers and Interpreters
1 Looping Chapter 6 2 Getting Looped in C++ Using flags to control a while statement Trapping for valid input Ending a loop with End Of File condition.
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
IST 210: PHP Logic IST 210: Organization of Data IST2101.
Review for Test2. Scope 8 problems, 60 points. 1 Bonus problem (5 points) Coverage: – Test 1 coverage – Exception Handling, Switch Statement – Array of.
CSE 219 Final exam review.
Don Braffitt Updated: 26-Mar-2013
Lect 11 - Stimulus & Response
Dependence Analysis Important and difficult
Static Single Assignment
Iterative Constructs Review
Java security (in a nutshell)
The Android Activity Lifecycle
State your reasons or how to keep proofs while optimizing code
Interface.
Lect 11 - Stimulus & Response
Chapter 6: Repetition Statements
Resolution Proofs for Combinational Equivalence
Java 6 Decompiler Joshua Cranmer.
Chapter 4 Action Routines.
Review for Test1.
Groovy.
Presentation transcript:

Java 6 Decompiler Joshua Cranmer

Steps of Decompilation Parse Java class file Recreate signatures Convert bytecode to Java executable code Verify bytecode Perform trivial conversion Reconstruct control structures Scope & Type Variables Simplify code

Last Time Class parsing: Signature recreation: All required information recovered Java 5 attributes recovered: signature, varargs, enums Debug attributes recovered: variable names Signature recreation: Valid for any method, field, class Enums, annotations partially destroyed No inner classes

Now Class parsing: Signature recreation: Bytecode conversion: Annotations fully recoverable Signature recreation: All information relating to annotations updated Bytecode conversion: Some simple types convertible Some scoping and typing of variables Minimal verification

Bytecode conversion Successive iterations of transforms Many can be condensed at this point Two main runs: StackAnalyzer + assorted StackAnalyzer verifies bytecode, performs SSA analysis, asserts certain invariants Assorted transforms provides trivial decompilation Trivial: aload_0; invokesuper <init>()V; return becomes super(); return

Variable Scoping and Typing MOST DIFFICULT PART Creation of SSA form: Each variable is only assigned to once Maximal variable assumption SSA unification: ongoing research Type is easy iff variables are not over-scoped

Future Cleanup of transformation sequences Start converting control structures Handle variables better