Methods for Software Protection Prof. Clark Thomborson Keynote Address at the International Forum on Computer Science and Advanced Software Technology.

Slides:



Advertisements
Similar presentations
Cryptography and Network Security 2 nd Edition by William Stallings Note: Lecture slides by Lawrie Brown and Henric Johnson, Modified by Andrew Yang.
Advertisements

H Mar-01 Clark Thomborson Software Security CompSci 725 Handout 12: Student Presentations, Watermarking & Obfuscation Clark Thomborson University.
Techniques for Software Watermarking and Fingerprinting Prof. Clark Thomborson Presentation at Tsinghua University 17 th March 2010.
Security Through Obscurity Clark Thomborson Version of 7 December 2011 for Mark Stamp’s CS266 at SJSU.
White-Box Cryptography
CMSC 414 Computer (and Network) Security Lecture 13 Jonathan Katz.
1 A Functional Taxonomy for Software Watermarking Jas Nagra, Clark Thomborson University of Auckland Christian Collberg University of Arizona.
Wmobf.1 1/5/00 Clark Thomborson Watermarking, Tamper-Proofing and Obfuscation – Tools for Software Protection Christian Collberg & Clark Thomborson Computer.
1 Obfuscation and Tamperproofing Clark Thomborson 19 March 2010.
Linear Obfuscation to Combat Symbolic Execution Zhi Wang 1, Jiang Ming 2, Chunfu Jia 1 and Debin Gao 3 1 Nankai University 2 Pennsylvania State University.
Traitor Tracing Vijay Ramachandran CS 655: E-commerce Foundations October 10, 2000.
19.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 19: Security The Security Problem Authentication Program Threats.
1 Cryptography and Network Security Third Edition by William Stallings Lecturer: Dr. Saleem Al_Zoubi.
FIT3105 Smart card based authentication and identity management Lecture 4.
File Management Systems
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Silberschatz, Galvin and Gagne  Operating System Concepts Module 19: Security The Security Problem Authentication Program Threats System Threats.
Applied Cryptography for Network Security
Chapter 12 File Management Systems
Testing an individual module
CMSC 414 Computer (and Network) Security Lecture 24 Jonathan Katz.
Cryptography and Network Security Chapter 1. Chapter 1 – Introduction The art of war teaches us to rely not on the likelihood of the enemy's not coming,
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Topics in Information Security Prof. JoAnne Holliday Santa Clara University.
E- Business Digital Signature Varna Free University Prof. Teodora Bakardjieva.
Encryption is a way to transform a message so that only the sender and recipient can read, see or understand it. The mechanism is based on the use of.
D ATABASE S ECURITY Proposed by Abdulrahman Aldekhelallah University of Scranton – CS521 Spring2015.
Air Force Association (AFA) 1. 1.Access Control 2.Four Steps to Access 3.How Does it Work? 4.User and Guest Accounts 5.Administrator Accounts 6.Threat.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
System/Software Testing
Dr. Lo’ai Tawalbeh 2007 INCS 741: Cryptography Chapter 1:Introduction Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus
Operating Systems Protection & Security.
Cryptography and Network Security
Eng. Wafaa Kanakri Second Semester 1435 CRYPTOGRAPHY & NETWORK SECURITY Chapter 1:Introduction Eng. Wafaa Kanakri UMM AL-QURA UNIVERSITY
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Watermarking University of Palestine Eng. Wisam Zaqoot May 2010.
The University of Akron Dept of Business Technology Computer Information Systems DBMS Functions 2440: 180 Database Concepts Instructor: Enoch E. Damson.
What is Computer Security? for Professor Ruan’s Class at Nankai University Clark Thomborson 2 nd April 2007.
The Protection of Information in Computer Systems Part I. Basic Principles of Information Protection Jerome Saltzer & Michael Schroeder Presented by Bert.
Digital image processing is the use of computer algorithms to perform image processing on digital images which is a subfield of digital signal processing.
Applying White-Box Cryptography SoBeNet user group meeting October 8, 2004 Brecht Wyseur.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Could Software Watermarks Express Both Rules and Assurances? Prof. Clark Thomborson Presentation to the ReTRUST Group Villach, Austria 11 th March 2008.
Protecting Software Code By Guards The George Washington University Cs297 YU-HAO HU.
Topic 1 – Introduction Huiqun Yu Information Security Principles & Applications.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
A paper by: Paul Kocher, Joshua Jaffe, and Benjamin Jun Presentation by: Michelle Dickson.
Identification Authentication. 2 Authentication Allows an entity (a user or a system) to prove its identity to another entity Typically, the entity whose.
How TPMs Can (and Should) Control Copyright Presentation to InternetNZ Copyright Workshop Prof. Clark Thomborson 13 th February 2007.
INTRODUCTION TO BIOMATRICS ACCESS CONTROL SYSTEM Prepared by: Jagruti Shrimali Guided by : Prof. Chirag Patel.
Architecting Systems to Protect Intellectual Property Presentation to NZTE China Workshop Prof. Clark Thomborson Auckland NZ 16 th November 2007.
CSCE 201 Identification and Authentication Fall 2015.
My topic is…………. - It is the fundamental building block and the primary lines of defense in computer security. - It is a basic for access control and.
Experience with Software Watermarking Jens Palsberg, Sowmya Krishnaswamy, Minseok Kwon, Di Ma, Qiuyun Shao, Yi Zhang CERIAS and Department of Computer.
Lecture 2 Page 1 CS 236 Online Security Policies Security policies describe how a secure system should behave Policy says what should happen, not how you.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Lecture 1 Introduction Dr. nermin hamza 1. Aim of Course Overview Cryptography Symmetric and Asymmetric Key management Researches topics 2.
IMAGE AUTHENTICATION TECHNIQUES Based on Automatic video surveillance (AVS) systems Guided by: K ASTURI MISHRA PRESENTED BY: MUKESH KUMAR THAKUR REG NO:
Security+ All-In-One Edition Chapter 1 – General Security Concepts
Hardware Protection Against Software Piracy
Software Security Testing
Cryptographic Hash Function
Information and Network Security
Software Watermarking Deterring Software Piracy
Methods for Software Protection
Cryptography and Network Security
Operating System Concepts
Cryptography and Network Security
Presentation transcript:

Methods for Software Protection Prof. Clark Thomborson Keynote Address at the International Forum on Computer Science and Advanced Software Technology Jiangxi Normal University 11 th June 2007

SW Protection 11June07 2 Questions to be (Partially) Answered What is security? What is software watermarking, and how is it implemented? What is software obfuscation, and how is it implemented? How does software obfuscation compare with encryption? Is “perfect obfuscation” possible?

SW Protection 11June07 3 What is Security? (A Taxonomic Approach) The first step in wisdom is to know the things themselves; this notion consists in having a true idea of the objects; objects are distinguished and known by classifying them methodically and giving them appropriate names. Therefore, classification and name-giving will be the foundation of our science. Carolus Linnæus, Systema Naturæ, 1735 (from Lindqvist and Jonsson, “How to Systematically Classify Computer Security Intrusions”, 1997.)

SW Protection 11June07 4 Standard Taxonomy of Security 1.Confidentiality: no one is allowed to read, unless they are authorised. 2.Integrity: no one is allowed to write, unless they are authorised. 3.Availability: all authorised reads and writes will be performed by the system. Authorisation: giving someone the authority to do something. Authentication: being assured of someone’s identity. Identification: knowing someone’s name or ID#. Auditing: maintaining (and reviewing) records of security decisions.

SW Protection 11June07 5 A Multi-Level Hierarchy Static security: the Confidentiality, Integrity, and Availability properties of a system. Dynamic security: the technical processes which assure static security. The gold standard: Authentication, Authorisation, Audit. Defense in depth: Prevention, Detection, Response. Security governance: the “people processes” which develop and maintain a secure system. Governors set budgets and delegate their responsibilities for Specification, Implementation, and Assurance.

SW Protection 11June07 6 Generalized Static Security Confidentiality, Integrity, and Availability are properties of read and write operations on data objects. What about executable objects? Unix directories have “rwx” permission bits. XXXX-ity: all executions must be authorised. GuiJu FangYuan ZhiZhiYe  a new English adjective “Guijuity”! At the top of a taxonomy we should combine, rather than divide. Confidentiality, Integrity, and Guijuity are Prohibitions. Availability is a Permission. S P−P− CIG P+ A S CIGA

SW Protection 11June07 7 Prohibitions and Permissions Prohibition: prevent an action. Permission: allow an action. There are two types of action-secure systems: In a prohibitive system, all actions are prohibited by default. Permissions are granted in special cases, e.g. to authorised individuals. In a permissive system, all actions are permitted by default. Prohibitions are special cases, e.g. when an individual attempts to access a secure system. Prohibitive systems have permissive subsystems. Permissive systems have prohibitive subsystems.

SW Protection 11June07 8 Recursive Security Prohibitions, i.e. “Thou shalt not kill.” General rule: An action (in some range P − ) is prohibited, with exceptions (permissions) E1, E2, E3,... Permissions, i.e. a “licence to kill” (James Bond). General rule: An action in P + is permitted, with exceptions (prohibitions) E1, E2, E3,... Static security is a hierarchy of controls on actions: P + : permitted E3 E1: prohibited E2 E11 E12

SW Protection 11June07 9 Is Our Taxonomy Complete? Prohibitions and permissions are properties of hierarchical systems, such as a judicial system. Most legal controls (“laws”) are prohibitive: they prohibit certain actions, with some exceptions (permissions). Contracts are non-hierarchical (agreed between peers), and consist mostly of requirements to act (with some exceptions): Obligations are promises to do something in the future. Exemptions are exceptions to an obligation. Obligations and exemptions are not well-modeled by action-security rules. Obligations arise occasionally in the law, e.g. a doctor’s “duty of care” or a trustee’s fiduciary responsibility.

SW Protection 11June07 10 Obligations are forbidden inactions; Prohibitions are forbidden actions. When we take out a loan, we are obligated to repay it. We are forbidden from never repaying. Exemptions are allowed inactions; Permissions are allowed actions. In the English legal tradition, a court can not compel a person to give evidence which would incriminate their spouse (husband or wife). This is an exemption from a general obligation to give evidence. We have added a new level to our hierarchy! Forbiddances and Allowances S Forbid ProObl Allow PerExe S ProPerOblExe

SW Protection 11June07 11 Reviewing our Questions  What is security? Three layers: static, dynamic, governance. A new taxonomic structure for static security: (forbiddances, allowances) x (actions, inactions). Four types of static security rules: prohibitions (including “guijus”), permissions, obligations, and exemptions.  What is software watermarking, and how is it implemented?  What is software obfuscation, and how is it implemented?

SW Protection 11June07 12 Defense in Depth for Software 1.Prevention: a)Deter attacks on forbiddances using obfuscation, encryption, watermarking, cryptographic hashes, or trustworthy computing. b)Deter attacks on allowances using replication or resilient algorithms. 2.Detection: a)Monitor subjects (user logs). Requires user ID: biometrics, ID tokens, or passwords. b)Monitor actions (execution logs, intrusion detectors). Requires code ID: cryptographic hashing, watermarking. c)Monitor objects (object logs). Requires object ID: hashing, watermarking. 3.Response: a)Ask for help: Set off an alarm (which may be silent – steganographic), then wait for an enforcement agent. b)Self-help: Self-destructive or self-repairing systems. Note: “steganography” means “secret writing” – an invisible watermark.

SW Protection 11June07 13 Software Watermarking Key taxonomic questions: Where is the watermark embedded?  How is the watermark embedded? When is the watermark embedded? Why is the watermark embedded?  What are its desired properties?

SW Protection 11June07 14 Software Watermarking Systems An embedder E(P; W; k)  P w embeds a message (the watermark) W into a program P using secret key k, yielding a watermarked program P w An extractor R(P w ;... )  W extracts W from P w In an invisible watermarking system, R (or a parameter) is a secret. In visible watermarking, R is well-publicised (ideally obvious). The attack set A and goal G model the security threat. For a robust watermark, the attacker’s goal is a false-negative extraction, usually by creating an attacked object a(P w ), with R(a(P w );... ) ≠ W such that P w is valuable. For a fragile watermark, the attacker’s goal is a false-positive: R(a(P w );... ) = W such that P w ≠ P is valuable. A protocol attack is a substitution of R’ for R, causing a false- negative or false-positive extraction.

SW Protection 11June07 15 Where Software Watermarks are Embedded Static code watermarks are stored in the section of the executable that contains instructions. Static data watermarks are stored in other sections of the executable Static watermarks are extracted without executing (or emulating) the code.  A watermark extractor is a special-purpose static analysis.  Extraction is inexpensive, but we don’t know of any robust static code watermarks. Attackers can easily modify the watermarked code to create an unwatermarked (false-negative) version.

SW Protection 11June07 16 Dynamic Watermarks Easter Eggs are revealed to any end-user who types a special input sequence. Other dynamic behaviour watermarks:  Execution Trace Watermarks are carried in the instruction execution sequence of a program, when it is given a special input sequence (possibly null).  Data Structure Watermarks are built by a program, when it is given a special input.  Data Value Watermarks are produced by a program on a surreptitious channel, when it is given a special input.

SW Protection 11June07 17 Easter Eggs The watermark is visible – if you know where to look! Not very robust, after the secret is published. See

SW Protection 11June07 18 Dynamic Data Structure Watermarks The embedder inserts code in the program, so that it creates a recognisable data structure when given specific input (the key). Details are given in our POPL’99 paper, and in two published patent applications. Assigned to Auckland UniServices Ltd. I would very much like to find licensed uses for this technology! Implemented at (2000- ) Experimental findings by Palsberg et al. (2001): JavaWiz adds less than 10 kilobytes of code on average. Embedding a watermark takes less than 20 seconds. Watermarking increases a program’s execution time by less than 7%. Watermark retrieval takes about 1 minute per megabyte of heap.

SW Protection 11June07 19 Thread-Based Watermarks A dynamic watermark is expressed in the thread-switching behaviour of a program, when given a specific input (the key). The thread-switches are controlled by non-nested locks. NZ Patent , US Patent App 2005/ Article in IH’04; Jas Nagra’s PhD thesis, 2006 The embedder inserts tamper-proofing sequences which closely resemble the watermark sequences but which, if removed, will cause the program to behave incorrectly. This is a “self-help” response mechanism.

SW Protection 11June07 20 SW Watermarking (Review of Taxonomic Questions) Where is the watermark embedded?  How is the watermark embedded? When is the watermark embedded? Why is the watermark embedded?  What are its desired properties?

SW Protection 11June07 21 Active Watermarks We can embed a watermark during a design step (“active watermarking”: Kahng et al., 2001). IC designs may carry watermarks in place-route constraints. Register assignments during compilation can encode a software watermark, however such watermarks are insecure because they can be easily removed by an adversary. Most software watermarks are “passive”, i.e. inserted at or near the end of the design process.

SW Protection 11June07 22 Why Watermark Software? Invisible robust watermarks: useful for prohibition (of unlicensed use) Invisible fragile watermarks: useful for permission (of licensed uses). Visible robust watermarks: useful for assertion (of copyright or authorship). Visible fragile watermarks: useful for affirmation (of authenticity or validity).

SW Protection 11June07 23 A Fifth Function? Any watermark is useful for the transmission of information irrelevant to security (espionage, humour, …). Transmission Marks may involve security for other systems, in which case they can be categorised as Permissions, Prohibitions, etc.

SW Protection 11June07 24 Our Functional Taxonomy for Watermarks [2002] But: there are no “assertions” and “affirmations” in our theory of static security!

SW Protection 11June07 25 Future and Past Actions The Rules of static security define what a system should do in the future. Assertions (e.g. of authorship) are Assurances about a past action. Affirmations (e.g. of authenticity) are Assurances about a past inaction. Audit records are Assertions. Identifications and Authentications are Affirmations. Secure Assure AffirmAssert Rule Forbid ProhibitObligate Allow PermitExempt

SW Protection 11June07 26 Reviewing our Questions  What is Security?  What is software watermarking, and how is it implemented?  What is software obfuscation, and how is it implemented?  How does software obfuscation compare with encryption? Is “perfect obfuscation” possible?

SW Protection 11June07 27 What is Obfuscation? Obfuscation is a semantics-preserving transformation of computer code that renders it more secure against confidentiality attacks.

SW Protection 11June07 28 What Secrets are in Software? Algorithms (so competitors or attackers can’t build similar functionality without redesigning from scratch). Constants, such as an encryption key (typically hidden in code that computes obscure functions of this constant). Internal function points, such as a license- control predicate “if (not licensed) exit()”. External interfaces (to deny access by attackers and competitors to an intentional “service entrance” or an unintentional “backdoor”).

SW Protection 11June07 29 Security Boundary for Obfuscation Algorithm Function Points Secret Keys Secret Interface Source code P Executable X’ Same behaviour as X Released to attackers who want to know secrets: source code P, algorithm, unobfuscated X, function points, … Obfuscator Executable X Compiler

SW Protection 11June07 30 Security Boundary for Encryption Algorithm Secret Keys Secret Interface Source code P Compiler Encrypted file E(X) Encrypter Executable X Buffer (RAM) CPU Attacker’s GUI and I/O Attacker’s computer Decrypter Function Points

SW Protection 11June07 31 Encryption v. Obfuscation + Strong encryption E() can be used. Security is assured if key-secrecy is maintained, and if the attacker is unable to look inside the “black-box” CPU. – We need a “black box” for the key-store, decryption, and execution. If the black box isn’t big enough to store the entire program, then branches into an undecrypted block will stall the CPU. This runtime penalty is proportional to block size, but stronger encryption  larger blocks  larger runtime penalty. The RAM buffer and the decrypter must be large and fast, to minimize the number of undecrypted blocks, but “large and fast”  “expensive or insecure”. “Black boxes” are obfuscations – we build them either from hardware or from software.

SW Protection 11June07 32 Partial Encryption Small portions of large executables can be protected with strong encryption, at reasonable cost. The remainder of the executable may be unprotected, or protected with cheap-but-insecure encryption. “Small portions” = some or all of the control transfers, plus a few of the variables (Maude & Maude, 1984; many similar articles and patents since 1984) The strongly-protected portions are executed in a secure hardware environment, e.g. a smart card. Extreme case: a dongle is a secure execution environment for just one predicate “if ( licensed(x) ) …” Performance penalties may be large, especially when more than one protected program is being executed.

SW Protection 11June07 33 How to Obfuscate Software? Lexical layer: obscure the names of variables, constants, opcodes, methods, classes, interfaces, etc. (Important for interpreted languages and named interfaces.) Data obfuscations: obscure the values of variables (e.g. by encoding several booleans in one int ; encoding one int in several float s; encoding values in enumerable graphs) obscure data structures (e.g. transforming 2-d arrays into vectors, and vice versa). Control obfuscations (to be explained later)

SW Protection 11June07 34 Attacks on Data Obfuscation An attacker may be able to discover the decoding function, by observing program behaviour immediately prior to output: print( decode( x ) ), where x is an obfuscated variable. An attacker may be able to discover the encoding function, by observing program behaviour immediately after input. A sufficiently clever human will eventually de- obfuscate any code. Our goal is to frustrate an attacker who wants to automate the de-obfuscation process. More complex obfuscations are more difficult to de- obfuscate, but they tend to degrade program efficiency and may enable pattern-matching attacks.

SW Protection 11June07 35 Cryptographic Obfuscations? Cloakware have patented an algebraic obfuscation on data, but it does not have a cryptographic secret key. W Zhu, in my group, fixed a bug in their division algorithm. An ideal data obfuscator would have a cryptographic key that selects one of 2 64 encoding functions. Fundamental vulnerability: The encoding and decoding functions must be included in the obfuscated software. Otherwise the obfuscated variables cannot be read and written. “White-box cryptography” is an obfuscated code that resists automated analysis, deterring adversaries who would extract a working implementation of the keyed functions or of the keys themselves.

SW Protection 11June07 36 Perfect Obfuscation? Function Ensemble F Property π: F → {0,1} Secret Message Program P for f  F Polynomial Time Bound p() Obfuscated Program P’ communicates 1 bit π(f) of secret message No obfuscator can prevent this prisoner from sending messages to an accomplice (Barak et al, 2001). But... the de-obfuscator might have to spend non-linear effort on a program that was obfuscated in linear time. Obfuscator

SW Protection 11June07 37 Practical Data Obfuscation Barak et al. have proved that “perfect obfuscation” is impossible, but “practical obfuscation” is still possible. We cannot build a “black box” (as required to implement an encryption) without using obfuscation somewhere – either in our hardware, or in software, or in both. In practical obfuscation, our goal is to find a cost- effective way of preventing our adversaries from learning our secret for some period of time. This places a constraint on system design – we must be able to re-establish security after we lose control of our secret. “Technical security” is insufficient as a response mechanism. Practical systems rely on legal, moral, and financial controls to mitigate damage and to restore security after a successful attack.

SW Protection 11June07 38 Control Obfuscations Inline procedures Outline procedures Obscure method inheritances (e.g. refactor classes) Opaque predicates: Dead code (which may trigger a tamper- response mechanism if it is executed!) Variant (duplicate) code Obscure control flow (“flattened” or irreducible)

SW Protection 11June07 39 Opaque Predicates {A; B }  A B pTpT T F “always true” A B P?P? T F “indeterminate” B’ A B PTPT T F “tamperproof” B bug Note: “always false” is not shown on this slide.

SW Protection 11June07 40 Opaque Predicates on Graphs Dynamic analysis is required to deobfuscate – this is very difficult to automate! fg fg g.Merge(f) f.Insert(); g.Move(); g.Delete() if (f = = g) then …

SW Protection 11June07 41 History of Software Obfuscation “Hand-crafted” obfuscations: IOCCC (Int’l Obfuscated C Code Contest, ); a few earlier examples. InstallShield has used obfuscation since its first product (1987). Automated lexical obfuscations since 1996: Crema, HoseMocha, … Automated control obfuscations since 1996: Monden. Opaque predicates since 1997: Collberg, Thomborson, Low. Commercial vendors since 1997: Cloakware, Microsoft (in their compiler). Commercial users since 1997: Adobe DocBox, Skype. Obfuscation is still a small field, with just a handful of companies selling obfuscation products and services. There are only a few non-trivial published results, and a few patents.

SW Protection 11June07 42 Summary A new taxonomy of static security: (forbiddance, allowance) x (action, inaction) = (prohibition, permission, obligation, exemption). Progress toward a general theory for hierarchical and peering secure systems. (past, future) x (P-, P+) x (action, inaction) ?? Existing theories of P- security for future actions Bell-LaPadula, for confidentiality Biba, for integrity Clark-Wilson, for guijuity An overview of software security techniques, focussing on watermarking and obfuscation.