• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Static Software Watermarking
 

Static Software Watermarking

on

  • 2,102 views

Presentation from World Congress on Internet Security 2011, London. ...

Presentation from World Congress on Internet Security 2011, London.

Based on the paper "A Survey of Static Software Watermarking" with some thoughts on the usefulness of watermarking for software protection.

http://jameshamilton.eu/content/survey-static-software-watermarking

Statistics

Views

Total Views
2,102
Views on SlideShare
1,815
Embed Views
287

Actions

Likes
0
Downloads
48
Comments
0

7 Embeds 287

http://jameshamilton.eu 254
http://dev.jameshamilton.eu 26
http://jameshamilton.biz 2
http://dev.jameshamilton 2
http://translate.googleusercontent.com 1
http://jameshamilton.mobi 1
http://www.docshut.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Static Software Watermarking Static Software Watermarking Presentation Transcript

    • Software Watermarking James Hamilton, PhD Student 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1
    • Software Watermarking - Motivation software company software 'thief' 0001010101010101101111 0101001011010101101010 1010010101010101010101 1010010000000101010101 1010010101011111111010 0001010101010101101111 0101001011010101101010 1010010101010101010101 1010010000000101010101 1010010101011111111010 copy
    • Software Watermarking – what is it? software company software 'thief' 0001010101010101101111 010100 MICROSOFT 11010 1010010101010101010101 1010010000000101010101 1010010101011111111010 copy 0001010101010101101111 010100 MICROSOFT 11010 1010010101010101010101 1010010000000101010101 1010010101011111111010 Allows the software author to prove ownership.
    • Software Fingerprinting – what is it? software company 0001010101010101101111 010100 1234567890 101010 1010010101010101010101 1010010000000101010101 1010010101011111111010 copy Allows the software author to prove the source of the copied software. 0001010101010101101111 010100 1234567890 101010 1010010101010101010101 1010010000000101010101 1010010101011111111010 software 'thief'
    • Software Watermarking – what is it not?
      • It does not prevent copying software.
      • It does not prevent decompilation or program understanding.
      • But it could be used in-conjunction with obfuscation (need to be careful the obfuscation doesn't remove the watermark).
      Obfuscate Decompile public class HelloWorld { public String wm = “Microsoft”; public static void main(String[] args) { System.out.println(“Hello World”); } }
    • Static Software Watermarking
    • Dynamic Software Watermarking
      • Embeds code to generate a watermark at run-time.
      • Recogniser uses a debugger to extract watermark.
      • Should be resilient to semantics-preserving transformations.
      • .
    • Code Replacement & Addition
      • Very basic, early algorithms simply replaced sections of code, or data, with watermark code.
      • Susceptible to collusive attacks if the watermarks are placed in the same location in every copy of a program.
      • Monden et al. [1] encode the watermark as a sequence of bytecode sequences which replace instructions in a dummy method.
        • difficult to generate code which is similar to the original program
        • easily remove by semantics-preserving transformations
      [1] A. Monden, H. Iida, K.-ichi Matsumoto, K. Inoue, and K. Torii, “A practical method for watermarking java programs,” Computer Software and Applications Conference, 2000. COMPSAC 2000. The 24th Annual International, Washington, DC, USA: IEEE, 2002, p. 191–197.
    • Code Re-Ordering
      • The watermark is encoded as the n th permutation of some set
      • Davidson and Myhrvold [1] encode the watermark as the n th permutation of the set of basic blocks in a method.
        • higly unstealthy due to a greater ratio of goto instructions [2]
      • Another option, in Java, is to re-order the constant pool (Gong et al. )
      • Requires the original program from comparison
      [1] R.I. Davidson and N. Myhrvold, “Method and system for generating and auditing a signature for a computer program,” US Patent 5,559,884, Sep. 1996. [2] Myles, G. et al., 2005. The evaluation of two software watermarking algorithms. Softw. Pract. Exper., 35(10), 923–938. [3] D. Gong, F. Liu, B. Lu, and P. Wang, “Hiding Informationin in Java Class File,” International Symposium on Computer Science and Computational Technology, 2008. ISCSCT ’08., IEEE Computer Society, 2008, pp. 160-164.
    • Register Allocation
      • the watermark is encoded in the interference graph, which is used to model the relationship between variables.
      • each vertex represents a variable and an edge between the two variables indicates that their live ranges overlap.
      • we colour the graph in order to minimise the number of registers and ensure that two live variables do no share a register.
      • QP algorithm [1] adds edges to the graph
      • QP is flawed; QPS, QPI, CC and CP followed with a similar idea.
      [1] G. Qu and K. Potkonjak, “Analysis of watermarking techniques for graph coloring problem,” Computer-Aided Design, 1998. ICCAD 98. Digest of Technical Papers. 1998 IEEE/ACM International Conference on, San Jose, California, United States: IEEE, 2005, p. 190–193.
    • Graph Watermarking
      • Venkatesan et al. [1] encode the watermark in a CFG and 'connect' it to the original program.
      [1] R. Venkatesan, V. Vazirani, and S. Sinha, “A graph theoretic approach to software watermarking,” Information Hiding, Springer, 2001, p. 157–168.
    • Example of a bad watermarking algorithm push 4 push 52 push 34 push 12 pop pop pop pop push 1 push 23 push 1 push 4 pop pop pop pop Optimiser
    • Problems with static watermarks in general
      • can be unstealthy, if the watermark code is compared with 'normal' code
      • highly susceptible to semantics-preserving transformations
        • static watermarks rely on syntactic properties
      • without perfect tamper-proofing techniques an attacker can apply any semantics-preserving transformation to a program
        • tamper-proofing is hard & unstealthy
          • especially in Java
      • Static watermarks are not good for software protection
      Conclusion
    • What about dynamic watermarks?
      • in theory, should not be susceptible to semantics-preserving transformations (but some current ones are).
      • but, they can only protect a complete program rather than single modules, classes, methods etc.
      • can be susceptible to additive attacks
      • Better than static watermarks, but still not great.
      Conclusion
    • Watermark Stealthiness
      • Some watermarking algorithms are unstealthy
        • easy to find
        • 'strange looking' code
        • doesn't act like the rest of the program
      • statistical analysis of instructions (e.g. ratio of goto instructions)
      • program slicing metrics
    • Program slicing public void w() { int a = 1; b = a + 1; String wm = “mywatermark”; return b; } slicing criteria [1] Weiser, M., 1981. Program slicing. In ICSE '81: Proceedings of the 5th international conference on Software engineering. Piscataway, NJ, USA: IEEE Press, p. 439―449. Program Slice [1]: An independent program guaranteed to faithfully represent the original program within the domain of the specified subset of behaviour
    • Program slicing public void w() { int a = 1; b = a + 1; String wm = “mywatermark”; return b; } slicing criteria program slice shown in red
    • Program slicing public void w() { int a = 1; b = a + 1; String wm = “mywatermark”; return b; } slicing criteria
    • Opaque predicates
      • A predicate that's outcome is known a-priori
      • Can be used to protect watermarks from slicing attacks
      • Introduces false dependencies to stop slicing
      public void w() { int a = 1; b = a + 1; String wm = “mywatermark”; if(P F ) { b = wm.length(); } return b; }
    • Problems with watermarks in general software company software 'thief' judge Prove that the software is yours here's my watermark
    • Problems with watermarks in general software company software 'thief' judge and here's my watermark who can I believe?
    • Problems with watermarks in general software company software 'thief' judge independent software expert I've examined the watermark recogniser carefully, and believe I that only one recogniser is genuine
    • Problems with watermarks in general software company software 'thief' judge independent software expert the real author could demonstrate ownership by showing the source-code of their software (without the need for software watermarks) show me your source-code.
    • Decompilation
      • The attacker could decompile the the program to get their own source-code to demonstrate they own the code
      • But it will 'look' decompiled
        • incoherent variable names
        • no comments
        • verbose code
        • extraneous instructions
      • The attacker will probably have little understanding of the code and will have trouble answering trivial questions about it
    • Conclusion
      • There are many static watermarking algorithms but they are all susceptible to trivial semantics-preserving transformation attacks.
      • Dynamic watermarks are better but can also be susceptible to attacks.
      • Unstealthy watermarks give an attacker clues and allow them to remove a watermark easier.
      • Program slicing may be able to give clues about watermarks, and/or help remove them.
      • Maybe watermark is not actually needed or useful.
    • Any comments or questions? Thanks http://jameshamilton.eu/ http://www.gold.ac.uk/computing