Introduction to Program Obfuscation



Similar documents
Applications of obfuscation to software and hardware systems

Guaranteed Slowdown, Generalized Encryption Scheme, and Function Sharing

Design of Java Obfuscator MANGINS++ - A novel tool to secure code

Code Obfuscation. Mayur Kamat Nishant Kumar

Software Protection through Code Obfuscation

Implementation of an Obfuscation Tool for C/C++ Source Code Protection on the XScale Architecture *

Non-Black-Box Techniques In Crytpography. Thesis for the Ph.D degree Boaz Barak

Obfuscation: know your enemy

Surreptitious Software

Code Obfuscation Literature Survey

Specifying Imperative Data Obfuscations

Software Code Protection Through Software Obfuscation

SOURCE CODE OBFUSCATION BY MEAN OF EVOLUTIONARY ALGORITHMS

Ch.9 Cryptography. The Graduate Center, CUNY.! CSc Theoretical Computer Science Konstantinos Vamvourellis

Static Analysis of Virtualization- Obfuscated Binaries

On the Concept of Software Obfuscation in Computer Security

Theory and Practice of Program Obfuscation

Computational Soundness of Symbolic Security and Implicit Complexity

Lecture 15 - Digital Signatures

Lecture 9 - Message Authentication Codes

Obfuscating C++ Programs via Control Flow Flattening

Lecture 2: Complexity Theory Review and Interactive Proofs

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

What is Software Watermarking? Software Watermarking Through Register Allocation: Implementation, Analysis, and Attacks

An Overview of Common Adversary Models

Using Evolutionary Algorithms to obfuscate code

Lecture 11: The Goldreich-Levin Theorem

OBFUSCATING C++ PROGRAMS VIA CONTROL FLOW FLATTENING

Block encryption. CS-4920: Lecture 7 Secret key cryptography. Determining the plaintext ciphertext mapping. CS4920-Lecture 7 4/1/2015

RE-TRUST. PoliTO Prototypes Overview. Paolo Falcarin, Stefano DiCarlo Alessandro Cabutto, Nicola Garazzino, Davide Barberis

Obfuscation of Abstract Data-Types

Developing and Investigation of a New Technique Combining Message Authentication and Encryption

Advanced Cryptography

Textbooks: Matt Bishop, Introduction to Computer Security, Addison-Wesley, November 5, 2004, ISBN

Paillier Threshold Encryption Toolbox

Lecture 5 - CPA security, Pseudorandom functions

Man at the end (MATE) attacks are an understudied

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

A Secure Decentralized Access Control Scheme for Data stored in Clouds

Software Reverse Engineering

Arnab Roy Fujitsu Laboratories of America and CSA Big Data WG

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

Obfuscation for Cryptographic Purposes

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

The Mathematics of the RSA Public-Key Cryptosystem

Non-interactive and Reusable Non-malleable Commitment Schemes

MULTIFACTOR AUTHENTICATION FOR SOFTWARE PROTECTION

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

IMPROVED SECURITY MEASURES FOR DATA IN KEY EXCHANGES IN CLOUD ENVIRONMENT

Lecture 12: Software protection techniques. Software piracy protection Protection against reverse engineering of software

Privacy and Security in library RFID Issues, Practices and Architecture

Cryptography and Network Security

for Malware Analysis Daniel Quist Lorie Liebrock New Mexico Tech Los Alamos National Laboratory

Yale University Department of Computer Science

Adversary Modelling 1

DATA OBFUSCATION. What is data obfuscation?

Bypassing Local Windows Authentication to Defeat Full Disk Encryption. Ian Haken

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Lecture 3: One-Way Encryption, RSA Example

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

Lecture 1: Introduction. CS 6903: Modern Cryptography Spring Nitesh Saxena Polytechnic University

Introduction. Digital Signature

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Designing a Secure Client-Server System Master of Science Thesis in the Programme Software Engineering & Technology

Assessment Plan for CS and CIS Degree Programs Computer Science Dept. Texas A&M University - Commerce

CSE331: Introduction to Networks and Security. Lecture 20 Fall 2006

CS 361S - Network Security and Privacy Spring Homework #1

Hash Functions. Integrity checks

How to Prove a Theorem So No One Else Can Claim It

Penetration Testing: Lessons from the Field

Obfuscation by Partial Evaluation of Distorted Interpreters

k-gram Based Software Birthmarks

Computer and Network Security. Alberto Marchetti Spaccamela

Security in Android apps

An Intermediate Level Obfuscation Method

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Victor Shoup Avi Rubin. Abstract

Cryptographic mechanisms

Lecture 10: CPA Encryption, MACs, Hash Functions. 2 Recap of last lecture - PRGs for one time pads

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

Fundamentals of Computer Security

Design Notes for an Efficient Password-Authenticated Key Exchange Implementation Using Human-Memorable Passwords

Transcription:

Introduction to Program Obfuscation p. 1/26 Introduction to Program Obfuscation Yury Lifshits Saint-Petersburg State University http://logic.pdmi.ras.ru/ yura/ yura@logic.pdmi.ras.ru

Introduction to Program Obfuscation p. 2/26 Some Linguistics Obfuscate: tr.v. -cated, -cating, -cates. 1. a. To render obscure. b. To darken. 2. To confuse: his emotions obfuscated his judgment. [Lat. obfuscare, to darken : ob(intensive) + Lat. fuscare, to darken < fuscus, dark.] -obfuscation n. obfuscatory adj die Benebelung die Trübung die Verdunkelung die Verschleierung - von Tatsachen die Verwirrung In German Obfuscation is

Introduction to Program Obfuscation p. 3/26 Overview Introduction: Notion of obfuscation Motivation and applications Research history and commercial obfuscators State-of-the-art: Code tricks Theoretical approach & provable security Conclusions Evaluation of current results and future research

Introduction to Program Obfuscation p. 4/26 Notion of Obfuscation An obfuscator: An algorithm O such that for any program P, O(P ) is also a program with following properties: Functionality: The obfuscated program should have the same functionality (that is, input/output behavior) as the input program. Efficiency: The obfuscated program shouldn t be much less efficient than the input program. Obfuscation: This means that the code of the obfuscated program should be hard to understand.

Introduction to Program Obfuscation p. 5/26 Applications Protection of constants and data of the program Authentication schemes, e-money, license management Protection from intelligent tampering E-money, license management Algorithms Protection Defence against competitors Viruses modification Making old viruses unrecognizable Private key cryptosystems Public key cryptosystem Basic idea: public key = obfuscated encrypting algorithm of private key cryptosystem

Introduction to Program Obfuscation p. 6/26 Motivation to research Practical necessity Wide use of Java byte-code technology New topic: not well developed yet No single generally accepted formal definition of obfuscation exists We hope: there are good obfuscation algorithms Average code is very obfuscated; Rice s theorem; Classically hard problems Famous researchers and institutes are involved Weizmann, Princeton, Stanford; O. Goldreich, P.C. van Oorschot The International Obfuscated C Code Contest http://ioccc.org Can be approached both in theoretical & practical ways

Introduction to Program Obfuscation p. 7/26 Research Highlights 1997 A taxonomy of obfuscating transformations C. Collberg, C. Thomborson, D. Low 2001 Impossibility result B. Barak, O. Goldreich, R. Impagliazzo, S. Rudich, A. Sahai, S. Vadhan and K. Yang. 2003 First attempt to survey L. D Anna, B. Matt, A. Reisse, T. Van Vleck, S. Schwab and P. LeBlanc. A series of Ph.D Dissertations: G. Wroblewski, D. Low, C. Wang... = Good Ph.D. topic!

Introduction to Program Obfuscation p. 8/26 Commercial Obfuscators Most common techniques: name mangling control flow mangling strings encryption SandMark www.cs.arizona.edu/sandmark/ Cloakware, Retroguard, DashO, Klassmaster, yguard & many more... http://dmoz.org/ Computers Programming Languages Java Development Tools Obfuscators/

Introduction to Program Obfuscation p. 9/26 State-of-the-Art Code transformations Pro et Contra Basic tricks Opaque predicates Flat control flow Theoretic approach Pro et Contra Blackbox security Examples of obfuscation with cryptographic security Other research directions

Introduction to Program Obfuscation p. 10/26 Coding transformations Advantages Easy to implement Universal Good against static analysis Disadvantages No guaranteed security Even no hope for that Weak against dynamic attacks

Introduction to Program Obfuscation p. 11/26 Simple tricks Split & merge variables, constants, procedures, modules Increase & decrease dimension of arrays Increase & decrease nesting Addressing & dereferencing Renaming Reordering Cloning Strings encrypting

Introduction to Program Obfuscation p. 12/26 Opaque predicates Reordering of blocks execution Dead code insertion Inserting new IF operators Opaque predicates: every time the same value. Difficult to discover by automatical static analysis If ((q + q 2 ) mod 2) = 0 then do real work else do dead code If (any boolean expression) then do real work do just the same else

Introduction to Program Obfuscation p. 13/26 Control flow flattening Write down a list of all basic blocks Split and merge some of them Enumerate them Replace all calls by indirect pointing: goto block name goto block number-th block goto v-th block Write a single dispatcher to maintain all control flow

Introduction to Program Obfuscation p. 14/26 Provable security Good News + Guaranteed security! based on computationally hard problems + Some positive results Bad News Now: only protection of internal constants. P computes f(x, p). Task: protect p. No hope for universal method

Introduction to Program Obfuscation p. 15/26 Black-box security Informally: an obfuscator should provide a virtual black-box in the sense that giving a O(P ) code to someone is equivalent to giving him a black box that computes P Just the same: anything that can be learned from the obfuscated form, could have been learned by merely observing the programs input-output behavior (i.e., by treating the program as a black-box). This definition is impossible to meet!

Introduction to Program Obfuscation p. 16/26 Interactive access control Directed multi-graph G Each node representing an access point (some abstract secrets & local map inside) Each edge has a password checking on it S is predefined start access point (start node) User: knows some passwords No a priori knowledge about G Begins his way from S

Introduction to Program Obfuscation p. 17/26 IAC task for obfuscation The user can reach an access point only by presenting credentials that can take him from the start node to that point. The user gains complete access to a function or secret available at an access point if and only if the user has reached that access point. The user does not learn anything about the structure of the graph, except what is revealed by the secrets at the access points he reached and the edges he traversed. Result[2004]: Black-box security achieved! Security based on (existence of) pseudorandom functions

Introduction to Program Obfuscation p. 18/26 Hiding password checking Program Π: var x:string, y:bit; input(x); y:=0; output(y); Family of Programs Π k : var x:string, y:bit; input(x); if k = w then y := 1 else y := 0; output(y); Task: make these programs indistinguishable Result[2001]: Any probabilistic polynomial algorithm can recognize the actual case with at most 1/2 + neg(size of pass) probability. Based on (existing of) one-way permutations.

Introduction to Program Obfuscation p. 19/26 Not in this talk Secure architectures approach new presentation forms to distribute programs Obfuscation in multiparty systems splitting program to the set of communicating programs Making disassembling harder

Introduction to Program Obfuscation p. 20/26 Conclusions Evaluation of the current results Important research directions Some useful links

Introduction to Program Obfuscation p. 21/26 Has been already done Many coding transformations Obscuring static analysis Some obfuscations with cryptographic security First steps from general method to attack-dependent obfuscation

Introduction to Program Obfuscation p. 22/26 Necessary to do Measuring quality of obfuscation algorithms Evaluating of existing methods Now: only code complexity metrics Study of deobfuscation algorithms Finding hard problems for code analysis Universal mathematical model Cryptographic (computational) security for obfuscation

Introduction to Program Obfuscation p. 23/26 Best links to start with L. D Anna, B. Matt, A. Reisse, T. Van Vleck, S. Schwab and P. LeBlanc. Self-protecting mobile agents obfuscation report. Technical Report #03-015, Network Associates Labs, June 2003: http://opensource.nailabs.com/jbet/papers/obfreport.pdf Code Obfuscation presentation by Mayur Kamat & Nishant Kumat: http://ee.tamu.edu/ reddy/ee689_04/pres_mayur_nishant.pdf Obfuscators subdirectory of Dmoz.org: http://dmoz.org/computers/programming/languages/java/ Development_Tools/Obfuscators/ Resources on Obfuscation (huge collection of links to related papers, books & companies): http://www.scs.carleton.ca/ hshen2/ (resources section)

Introduction to Program Obfuscation p. 24/26 The End Thanks for your attention!

Introduction to Program Obfuscation p. 25/26 Question Time???????

Introduction to Program Obfuscation p. 26/26 Not covered by the talk Program Obfuscation as a part of Software Protection Operations on obfuscated code Micro-obfuscation: functions, procedures, data structures Adversary knowledge about the program Nonfunctional models of a program. Cost of the obfuscation Potential of obfuscation What can obfuscation change in the program? Different behavior on different runs (internal memory of the program). Nondeterministic nature of the obfuscator Efficiency of obfuscating transformations Obfuscatable program properties (e.g. set of all possible output values) Obfuscation by hiding small procedure in the big one (in steganographic style)