protecting software code by guards the george washington university cs297 yu-hao hu

25
Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Upload: malcolm-perry

Post on 05-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Protecting Software Code By Guards

The George Washington University

Cs297 YU-HAO HU

Page 2: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Motives

Software cracking is a serious threat to manyin the software industry.

Attackers can insert an unconditional jump to overpass the serial number checker.

How to protect important segment of code has became an issue.

Page 3: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

The Guarding Framework: Types of guard Guard: a piece of code responsible for

performing certain security-related actions during program execution.

Checksum code: Checksum another piece of program code at runtime and verify its integrity

Repair code: Restore a piece of damaged code to its original form before it is executed or used.

Page 4: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

The Guarding Framework: Guard Graph

Page 5: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

The Guarding Framework: Features Distributed-ness Multiplicity Dynamism Scalability

Page 6: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

The Guarding Framework: System

Guard template Binary manipulation Logical boundary between the data and executable

code should be blurred. Obfuscate guard code

Page 7: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

The Guarding Framework: Template Example

Page 8: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Conclusion

Distributed protection Various protection schemes Configurable tamper-resistance

Page 9: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Reference

Protecting Software Codes By GuardsHoi Chang, Mikhail J. AtallahCenter for Education and Research inInformation Assurance and Security & Arxan Technologies

PC Assembly Language (NASM)Paul A. Carter

Page 10: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Software Watermarking: Models and Dynamic Embeddings

The George Washington University

CS297YU-HAO HU

Page 11: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Types of Attacks to Watermarking System Subtractive attack: attackers can crop out wat

ermarks. Distortive attack: attackers can twist waterma

rks. Additive attack: attackers can override water

marks.

Page 12: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Fingerprinting System

Similar to watermarking system except it gives different secret messages to different receivers.

Vulnerable to collusive attack. Attackers can locate the secret messages by comparing different copies of messages.

Page 13: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Types of Watermarks: Static Watermarks Data Watermark

Ex. string C = “Copyright…”.

Code Watermark Ex. Additional data stored

in an object or wherever in the code.

Easy to be destroyed by optimization techniques.

Page 14: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Types of Watermarks: Dynamic Watermarks Easter Eggs Dynamic Data Structure

Embedded within the state of a program and showed with a particular input.

Dynamic Execution Trace It is extracted by

monitoring a special sequence of operations

Page 15: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Dynamic Graph Watermarking: Central Ideas Use the topology of a graph to represent

watermark. Graph is dynamically built in the heap. Examine the runtime object heap with the

special input sequence.

Page 16: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Dynamic Graph Watermarking: Embedding Watermarks

Pick number P & Q, n = P * Q Represent n as a graph Program W could build graph.

Page 17: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Dynamic Graph Watermarking : Embedding Watermarks

Embed W into original program Add temper-proofing Obfuscation

Page 18: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Dynamic Graph Watermarking : Embedding Watermarks

Remove recognizer to be product version

Page 19: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Dynamic Graph Watermarking: Verifying Watermarks

Links recognizer with the product Gives special input set I and gets the number n Factoring n to get P and Q

Page 20: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Obfuscation Techniques: Loop i = 1;

while ( i< 100){…i += 1;…}

Page 21: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Obfuscation Techniques: Loop i = 1, j = 100;

while ( (i< 100)&&((i+j)!=-1)){…i += 1;j = (j*100)%50;…}

Page 22: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Obfuscation Techniques: Class Inheritance

Class One

Class A

Class Z

Page 23: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Obfuscation Techniques: Class Inheritance

Class One

Class A

Class Z

Class AA

Interface A

Page 24: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

Dynamic Graph Watermarking: Conclusion Resistant to optimization, obfuscation

transformation because they don’t affect heap allocation.

Using reflection to prevent renaming or reordering graph nodes

Constantly checking graph to ensure the graph is not cropped out.

Page 25: Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU

References

Software Watermarking: Models and Dynamic Embeddings

Christian Collberg, Clark Thomborson

Manufacturing Cheap, Resilient, and Stealthy Opaque Constructs Christian Collberg, Clark Thomborson, Douglas Low

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

Low