breaking abstractions and unstructuring data structures christian collberg clark thomborson douglas...

9
Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low Mobile programs are distributed in forms that are isomorphic to the original source code. Such codes are easy to decompile, and hence they increase the risk of malicious reverse engineering attacks… Code obfuscation is a potent defence against reverse engineering. ”

Upload: emery-hart

Post on 24-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low

“Mobile programs are distributed in forms that areisomorphic to the original source code. Such codes are easy to decompile, and hence they increase the risk of malicious reverse engineering attacks… Code obfuscation is a potent defence against reverseengineering. ” 

Reviewer: Hongying lai

Page 2: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

Outline of the Paper

What is obfuscation ?

Transformation quality

Technique of obfuscation

Conclusion

Obfuscation is a process that renders software unintelligible but still functional.

- lexical transformation : modify the lexical structure of the program.

- data transformation : modify inheritance relations, ... - control transformation: alter control structures using opaque predicates.

In this presentation I will focus on data transformations.

- potency, resilience, stealth and cost.

Page 3: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

How to Obfuscate Data

Class – modify inheritance.

Procedural abstraction(Java methods)- convert a section of code into a different virtual machine;

- inline some methods, and outline other methods;

- clone methods.

Variable – split built-in data types.

Arrays – restructure

- split an array into several sub-arrays;

- merge two or more arrays into one array;

- fold an array( increasing the number of dimensions);

- flatten and array(decreasing the number of dimensions).

In this presentation I shall concentrate on modifying inheritance.

Page 4: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

modify inheritance

Review of stage-1 CS: what is a Java class- an encapsulation data( V ) and control( M ) .- an aggregation( C2 instance of type C1).

- an inheritance ( class C2 extends class C1 ) .

V2M2

V1M1

Root

C1

C2V2M2

Page 5: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

modify inheritance (factoring classes)

the complexity of a class grows with- its depth in the inheritance hierarchy.

- the number of its direct descendants.

VM

Root

CV1M1

Root

C1

C2V2M2

Root

V1M1

V2M2

C1 C2

Further from the root

More children

Page 6: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

modify inheritance (false refactoring classes)

Root

V1M1

V2M2

C1 C2

Root

V1M1

V2M2

C1 C2

V3M3

C3Insert a new

bogus class

Page 7: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

public class Cexample{

String message;

public Cexample(String message){

this.message = message ;

printMessage();

}

public void printMessage(){

System.out.println(message);

}

}

examplepublic abstract class C1example{

String message;

public C1example(String message){

this.message = message ;

printMessage(); }

public abstract String getMessage(String message);

public void printMessage(){

message = getMessage(message);

System.out.println(message); }

}

public class C2example extends C1example{

String message;

public C2example(String message){

this.message = message;}

public String getMessage(String message){

return message;}

}

VM

Root

CV1M1

Root

C1

C2V2M2

Further from the root

Page 8: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

Conclusion

Code obfuscation does not provide an application with absolute protection against a malicious reverse engineering attack. Obfuscation is a cheap way of making reverse engineering so technically difficult that it becomes economically infeasible.

Finding new obfuscation techniques is a sophisticated and challenging problem.

Page 9: Breaking Abstractions and Unstructuring Data Structures Christian Collberg Clark Thomborson Douglas Low “Mobile programs are distributed in forms that

Questions

Do you think that the more complicated

the obfuscating transformation is , the better ?