Presentation is loading. Please wait.

Presentation is loading. Please wait.

18/03/2007Obfuscation 1 Software protection Mariano Ceccato FBK - Fondazione Bruno Kessler

Similar presentations


Presentation on theme: "18/03/2007Obfuscation 1 Software protection Mariano Ceccato FBK - Fondazione Bruno Kessler"— Presentation transcript:

1 18/03/2007Obfuscation 1 Software protection Mariano Ceccato FBK - Fondazione Bruno Kessler ceccato@fbk.eu

2 18/03/2007 Obfuscation2 Traditional computer security  Most computer security research: Protect the integrity of a benign host (and its data) from attacks by malicious client programs  Basis of the Java security model Downloaded applet or virus infested application Restrict the actions that the client is allowed to perform  Software isolation A program is not able to write outside of a designated area (sandbox)

3 18/03/2007 Obfuscation3 More recent computer security  Interest in mobile agents changed the view of computer security Benign client code being threatened by host on which it has downloaded/installed  Defend a client is much more difficult than defend a host. To defend the host all is needed is to restrict the client Once the client code is in the host, the host can use any technique to violate its integrity.  Software piracy  Reverse Engineering  Software tampering

4 4 Problem 1: Malicious Reverse Engineering  Valuable piece of code is extracted from an application and incorporated into competitor’s code.

5 18/03/2007 Obfuscation5 Problem 2: Software piracy  Illegal copy ad resale of applications  12 billion $ per year, major concern for everyone who sells software  Solution used in the past: Dongle (it is weak and it annoys customers)

6 18/03/2007 Obfuscation6 Problem 3: Software tampering  E-commerce application programs contain encryption keys or other secret information. Pirates who are able to extract, modify, or otherwise tamper with this information can incur significant financial losses to the intellectual property owner.

7 7 Problem 1: Malicious Reverse Engineering  Valuable piece of code is extracted from an application and incorporated into competitor’s code.

8 8 Scenario Customer Charles Pirate Bob Author Alice IP Program Social Tools Advertising Legal Tools DMCA Technological Tools Obfuscation Watermarking Tamperproofing

9 18/03/2007 Obfuscation9 IP In A Program public class Fibonacci { Hashtable memo = new Hashtable(); public int fib ( int n ) { if ( !memo.contains(n) ) if ( n <= 2 ) memo.put(n,1); else memo.put(n, fib( n - 1 ) + fib( n - 2 )); return memo.get(n); }

10 10 Obfuscation  Obfuscation transforms a program into a new program which: Has the same semantics Is harder to reverse engineer

11 18/03/2007 Obfuscation11 Example public class Fibonacci { public int fib ( int n ) { if ( n <= 2 ) return 1; else return fib( n - 1 ) + fib( n - 2 ); }

12 18/03/2007 Obfuscation12 Example: Obfuscation public class x {public int x ( int x ) { return x <=2 ? 1 : x(x-1)+x(x-2); }}

13 18/03/2007 Obfuscation13 Problem 2: Software piracy  Illegal copy ad resale of applications  12 billion $ per year, major concern for everyone who sells software  Solution used in the past: Dongle (it is weak and it annoys customers)

14 14 Watermarking ID  Watermarking transforms a program into a new program which: Has the same semantics Contains some additional robust identifier

15 18/03/2007 Obfuscation15 Watermarking

16 18/03/2007 Obfuscation16 Example: Watermarking public class Fibonacci { String watermark = “Authored by Alice”; public int fibonacci ( int n ) { if ( false ) println ( “Authored by Alice” ); if ( n<=2 ) return 1; else return fib ( n - 1 ) + fib ( n - 2 ); }

17 18/03/2007 Obfuscation17 Example: Watermarking public class Fibonacci { public int fib ( int n ) { if ( opaque predicate ) println ( “Authored by Alice” ); if ( n<=2 ) return 1; else return fib ( n - 1 ) + fib ( n - 2 ); }

18 18/03/2007 Obfuscation18 Watermarking Embed a structure W into a program p such that:  W is easy to locate and extract from P  Embedding W in P does not affect performances (cheap)  Embedding W does not change statistical properties of P (static/dynamic stealth)  W has a mathematical property that allow to argue that its presence in P is the result of a deliberate action (e.g. product of two prime numbers)

19 18/03/2007 Obfuscation19 Additive attack:  Add a second watermark to program P.  Attack is effective if it is impossible to recover temporal precedence between watermarks.

20 18/03/2007 Obfuscation20 Distortive attack:  applying semantic-preserving transformations such that: W can not be recognized P is still useful for the attacker

21 18/03/2007 Obfuscation21 Collusive attack:  Attacker buys sever copy of program P, each one with a different fingerprint.  By comparing the different copy of P, fingerprint is located  Fingerprint can removed/modified

22 18/03/2007 Obfuscation22 Problem 3: Software tampering  E-commerce application programs contain encryption keys or other secret information. Pirates who are able to extract, modify, or otherwise tamper with this information can incur significant financial losses to the intellectual property owner.

23 23 Tamper-proofing trigger  Tamper-proofing transforms a program into a new program which: Has the same semantics on expected input “Explodes” on when even slightly modified or on unexpected input

24 18/03/2007 Obfuscation24 Example: Tamper-proofing public class Fibonacci { public int fibonacci ( int n ) { String encrypted = “0x10 0x21 0x11 0xa2 0x22 0x91 0x21 0x13 0xaf 0xff 0xef 0x48 0x12 0xa2 0x22 0x00…”; int key = “mykey”; Method decrypted = D (encrypted, key); return decrypted.invoke( n ); }


Download ppt "18/03/2007Obfuscation 1 Software protection Mariano Ceccato FBK - Fondazione Bruno Kessler"

Similar presentations


Ads by Google