Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits...

72
Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology Other Main Approaches Obfuscating Transformations Blackbox Security Mobile Cryptography Aspects of Model Program Representation Attacks and Environment Summary Different Concepts for Program Obfuscation Yury Lifshits Mathematics & Mechanics Faculty Saint Petersburg State University Spring 2005 – SETLab

Transcript of Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits...

Page 1: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Different Concepts for ProgramObfuscation

Yury Lifshits

Mathematics & Mechanics FacultySaint Petersburg State University

Spring 2005 – SETLab

Page 2: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Outline

1 ApplicationsClassical CryptographySoftware ProtectionMobile Agents TechnologyOther

Page 3: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Outline

1 ApplicationsClassical CryptographySoftware ProtectionMobile Agents TechnologyOther

2 Main ApproachesObfuscating TransformationsBlackbox SecurityMobile Cryptography

Page 4: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Outline

1 ApplicationsClassical CryptographySoftware ProtectionMobile Agents TechnologyOther

2 Main ApproachesObfuscating TransformationsBlackbox SecurityMobile Cryptography

3 Aspects of ModelProgram RepresentationAttacks and Environment

Page 5: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Applications for Obfuscation

Today: only short overview of applications

In details: Lecture 4 - “Applications for Obfuscation”

Page 6: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classical Cryptography

What applications in cryptography can we imagine?

Page 7: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classical Cryptography

What applications in cryptography can we imagine?

➯ Private key cryptosystem → Public key cryptosystemIt was mentioned even in famous Diffie-Hellman paper.

Page 8: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classical Cryptography

What applications in cryptography can we imagine?

➯ Private key cryptosystem → Public key cryptosystemIt was mentioned even in famous Diffie-Hellman paper.

➯ Homomorphic encoding

Page 9: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classical Cryptography

What applications in cryptography can we imagine?

➯ Private key cryptosystem → Public key cryptosystemIt was mentioned even in famous Diffie-Hellman paper.

➯ Homomorphic encoding

➯ Random oracles removing

Page 10: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Software Protection

Situation: we distribute (sell) software products.

Question: Threats and applications you see?

Page 11: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Software Protection

Situation: we distribute (sell) software products.

Question: Threats and applications you see?

➯ Competitors threat (reusing your code)

Page 12: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Software Protection

Situation: we distribute (sell) software products.

Question: Threats and applications you see?

➯ Competitors threat (reusing your code)

➯ Intelligent tampering (changing parameters)

Page 13: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Software Protection

Situation: we distribute (sell) software products.

Question: Threats and applications you see?

➯ Competitors threat (reusing your code)

➯ Intelligent tampering (changing parameters)

➯ Threat of functionality changes (protectiondemo-versions)

Page 14: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Software Protection

Situation: we distribute (sell) software products.

Question: Threats and applications you see?

➯ Competitors threat (reusing your code)

➯ Intelligent tampering (changing parameters)

➯ Threat of functionality changes (protectiondemo-versions)

➯ Watermarks protection

Page 15: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Mobile Agents Technology

Situation: we distribute programs for our needs.

Question: Threats and applications you see?

Page 16: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Mobile Agents Technology

Situation: we distribute programs for our needs.

Question: Threats and applications you see?

➯ Privacy: e.g. internet-distributed computation

Page 17: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Mobile Agents Technology

Situation: we distribute programs for our needs.

Question: Threats and applications you see?

➯ Privacy: e.g. internet-distributed computation

➯ Keys protection: buying agents.

Page 18: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Mobile Agents Technology

Situation: we distribute programs for our needs.

Question: Threats and applications you see?

➯ Privacy: e.g. internet-distributed computation

➯ Keys protection: buying agents.

➯ Intelligent tampering

Page 19: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Other applications

Question: More applications?

Page 20: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Other applications

Question: More applications?

Yes!

Page 21: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Other applications

Question: More applications?

Yes!

➯ Virus development

Page 22: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Other applications

Question: More applications?

Yes!

➯ Virus development

➯ Watermark attacks

Page 23: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

An Obfuscator

In details: Lecture 2 - “Obfuscating transformations”

Page 24: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

An Obfuscator

In details: Lecture 2 - “Obfuscating transformations”

➯ Functionality preserving

➯ Increase of code size, time & space requirements are restricted(usually by constant factor)

➯ Obfuscated program is not readable (not understandable)

Page 25: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classification of obfuscatingtransformations

What can we obfuscate in the program?

Page 26: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classification of obfuscatingtransformations

What can we obfuscate in the program?

➯ Layout transformationsChange formatting information

Page 27: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classification of obfuscatingtransformations

What can we obfuscate in the program?

➯ Layout transformationsChange formatting information

➯ Control flow transformationsAlter control program and computation

Page 28: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classification of obfuscatingtransformations

What can we obfuscate in the program?

➯ Layout transformationsChange formatting information

➯ Control flow transformationsAlter control program and computation

➯ Aggregation transformationRefactor program using aggregation methods

Page 29: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Classification of obfuscatingtransformations

What can we obfuscate in the program?

➯ Layout transformationsChange formatting information

➯ Control flow transformationsAlter control program and computation

➯ Aggregation transformationRefactor program using aggregation methods

➯ Data transformationsUse information encoding

Page 30: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Quality of Obfuscation

How good our obfuscation is?

Page 31: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Quality of Obfuscation

How good our obfuscation is?

Strength can be measured by:

➯ PotencyE(P′)E(P)

− 1

➯ ResilienceTrivial, weak, strong, full, one-way

➯ CostFree, cheap, costly, expensive

➯ Stealthy

Page 32: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Ideal case

What do we want to get?

Page 33: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Ideal case

What do we want to get?

Page 34: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Ideal case

What do we want to get?

Very limited information:

➯ input-output behavior

➯ running time

Page 35: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Ana and BAna

We are interested in 2 types of polynomial-time analyzers:

➯ Ana is a source-code analyzer that can read theprogram.

Ana(P)

➯ BAna is a black-box analyzer that only queries theprogram as an oracle.

BAnaP(time(P))

Page 36: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Ana and BAna

We are interested in 2 types of polynomial-time analyzers:

➯ Ana is a source-code analyzer that can read theprogram.

Ana(P)

➯ BAna is a black-box analyzer that only queries theprogram as an oracle.

BAnaP(time(P))

Black-Box security

Ana can’t get more information than BAna could

Page 37: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Property Hiding

How to formalize property hiding?

Page 38: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Property Hiding

How to formalize property hiding?

Instance: two families of programs Π1 and Π2

Adversary task: given a program P ∈ Π1 ∪ Π2 todecide whether P ∈ Π1 or P ∈ Π2.

Page 39: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Property Hiding

How to formalize property hiding?

Instance: two families of programs Π1 and Π2

Adversary task: given a program P ∈ Π1 ∪ Π2 todecide whether P ∈ Π1 or P ∈ Π2.

Desirable protection: make adversary task as difficult aswell-known computationally hard problem is.

Page 40: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Constant Hiding

How to formalize constant hiding?

Page 41: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Constant Hiding

How to formalize constant hiding?

Instance: family of programs

Π = {P|P computes f (s, x); s ∈ S}

Adversary task: given a program P ∈ Π to computeparameter s.

Page 42: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Constant Hiding

How to formalize constant hiding?

Instance: family of programs

Π = {P|P computes f (s, x); s ∈ S}

Adversary task: given a program P ∈ Π to computeparameter s.

Desirable protection: make adversary task as difficult aswell-known computationally hard problem is.

Page 43: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Encrypted Computation

More details: Lecture 5 - “Basic Complexity Results”

What is encrypted computation?

Basic task: keep F unknown to Bob.

Page 44: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Extendings of Encrypted Computation

Additional tasks of encrypted computation model:

➯ Move difficult computations to BobD is easier than F

➯ Reduce communication complexityIn the case sizeof ((F (x))� sizeof (x). Example: x is database

➯ Keep x secret from Alice

Page 45: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Currently studied representations

Obfuscating techniques development depends on usedprogram representation

So what sort of programs are we going to protect?

Page 46: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Currently studied representations

Obfuscating techniques development depends on usedprogram representation

So what sort of programs are we going to protect?

➯ Turing Machines / Circuits (function computing)

Page 47: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Currently studied representations

Obfuscating techniques development depends on usedprogram representation

So what sort of programs are we going to protect?

➯ Turing Machines / Circuits (function computing)

➯ C++/Java code

Page 48: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Currently studied representations

Obfuscating techniques development depends on usedprogram representation

So what sort of programs are we going to protect?

➯ Turing Machines / Circuits (function computing)

➯ C++/Java code

➯ Assembler code

Page 49: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Currently studied representations

Obfuscating techniques development depends on usedprogram representation

So what sort of programs are we going to protect?

➯ Turing Machines / Circuits (function computing)

➯ C++/Java code

➯ Assembler code

➯ Rational function / Matrix representation

Page 50: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Search for other representations

Is it enough?

Page 51: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Search for other representations

Is it enough?

Not! New models should contain:

Page 52: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Search for other representations

Is it enough?

Not! New models should contain:

➯ Current state of the program.

Page 53: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Search for other representations

Is it enough?

Not! New models should contain:

➯ Current state of the program.

➯ Self-modifiable code

Page 54: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Search for other representations

Is it enough?

Not! New models should contain:

➯ Current state of the program.

➯ Self-modifiable code

➯ Notion of computation trace.

Page 55: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Search for other representations

Is it enough?

Not! New models should contain:

➯ Current state of the program.

➯ Self-modifiable code

➯ Notion of computation trace.

➯ Other formalizations for functionality preserving.

Page 56: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Adversary

What should we specify about adversary?

Page 57: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Adversary

What should we specify about adversary?

➯ Adversary knowledge about protected program

Page 58: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Adversary

What should we specify about adversary?

➯ Adversary knowledge about protected programMember of family

Page 59: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Adversary

What should we specify about adversary?

➯ Adversary knowledge about protected programMember of familyKnown function – unknown parameters (data) and state.

Page 60: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Adversary

What should we specify about adversary?

➯ Adversary knowledge about protected programMember of familyKnown function – unknown parameters (data) and state.

➯ Adversary task (attack)

Page 61: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Adversary

What should we specify about adversary?

➯ Adversary knowledge about protected programMember of familyKnown function – unknown parameters (data) and state.

➯ Adversary task (attack)Classification follows in Lecture 4.

Page 62: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Potential for Obfuscation

Is it possible to protect every program?

Page 63: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Potential for Obfuscation

Is it possible to protect every program?

➯ How to measure potential of obfuscation?Learnability: black-box learnable functions areimpossible to obfuscate.

➯ What couldn’t be protected?Input-Outbut behaviourTraces

Page 64: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Network model

What are interesting network extentions of the model?

Page 65: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Network model

What are interesting network extentions of the model?

➯ Many programs cooperate

➯ Programs are migrating

➯ Programs can be recharged

➯ Different sources for inputs (outside connections)

Page 66: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Summary

➯ Rough idea of applications: cryptosystem design,mobile agents technology, software protection.

Page 67: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Summary

➯ Rough idea of applications: cryptosystem design,mobile agents technology, software protection.

➯ Basic approaches: obfuscating transformations,black-box security, encrypted computation.

Page 68: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Summary

➯ Rough idea of applications: cryptosystem design,mobile agents technology, software protection.

➯ Basic approaches: obfuscating transformations,black-box security, encrypted computation.

➯ Further aspects of the model: program representation,state protection, adversary description, functionalitypreserving.

Page 69: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Summary

➯ Rough idea of applications: cryptosystem design,mobile agents technology, software protection.

➯ Basic approaches: obfuscating transformations,black-box security, encrypted computation.

➯ Further aspects of the model: program representation,state protection, adversary description, functionalitypreserving.

Page 70: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

ApplicationsClassicalCryptography

Software Protection

Mobile AgentsTechnology

Other

MainApproachesObfuscatingTransformations

Blackbox Security

MobileCryptography

Aspects ofModelProgramRepresentation

Attacks andEnvironment

Summary

Summary

➯ Rough idea of applications: cryptosystem design,mobile agents technology, software protection.

➯ Basic approaches: obfuscating transformations,black-box security, encrypted computation.

➯ Further aspects of the model: program representation,state protection, adversary description, functionalitypreserving.

Question Time!

Page 71: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

Back UpSlidesNot covered by thetalk

References

Not covered by the talk

Gray & white securityApproximate obfuscatorsOperations on obfuscated codeAdversary successNondeterministic natureModifying algorithm vs. modifying codeComplexity of deobfuscation: NP, NP-hard, undecidable,one-way...Obfuscation on specification levelWroblewsky model

Page 72: Different Concepts for Program Obfuscationyura/of/01.pdf · Concepts of Obfuscation Yury Lifshits Applications Classical Cryptography Software Protection Mobile Agents Technology

Concepts ofObfuscation

Yury Lifshits

Back UpSlidesNot covered by thetalk

References

For Further Reading

Yury LifshitsProgram Obfuscation. A Survey [in Russian]http://logic.pdmi.ras.ru/˜yura/of/survey1.pdf

Luis F.G. SarmentaProtecting Programs from Hostile Environmentshttp://bayanihancomputing.net/papers/ae/ae.ps