21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Detecting modification to a compiled binary<br />

• Obfuscating code instructions to impede the understanding of an algorithm<br />

• Obfuscating data in the program<br />

• Defeating analysis tools<br />

The techniques provided in this chapter are not exhaustive, but rather are intended<br />

to demonstrate the options that are available to the programmer, and to provide<br />

easy-to-use code and macros for protecting binaries. Much of the code provided is<br />

intended to serve as example code, which, for the sake of clarity, limits the code to<br />

the technique being discussed. Secure applications of many of these techniques—<br />

such as determining where to store keys and valid checksums, or how to detect the<br />

success or failure of a validation check without using a conditional jump—require<br />

combining different techniques in a single protection. It is left to the reader to devise<br />

these combinations based on the examples provided. Many of the techniques presented<br />

here—most notably in the anti-debugger section—do not represent the most<br />

innovative of software protection technology because of the complexity of more<br />

advanced topics. Those interested in pursuing the topic of software protection are<br />

encouraged to read the papers listed in the “See Also” section, but note that this is by<br />

no means an exhaustive list of such literature.<br />

See Also<br />

• “A Taxonomy of Obfuscating Transformations” by Christian Collberg, Clark<br />

Thomborson, and Douglas Low: http://www.cs.arizona.edu/~collberg/Research/<br />

Publications/CollbergThomborsonLow97a/index.html<br />

• “Richey’s Anti Cracking FAQ”: http://mail.hep.by/mirror/wco/T99/Anticrk.htm<br />

• “Post-Discovery Strategies” by Seplutra: http://www.cwizardx.com/vdat/<br />

tusp0001.htm#antidebug<br />

• “Protecting Your Programs from Piracy” by Vitas Ramanchauskas: http://mail.<br />

hep.by/mirror/wco/T99/Antihack.htm<br />

• UPX Open Source Executable Packer: http://upx.sourceforge.net<br />

12.2 Detecting Modification<br />

<strong>Problem</strong><br />

Binary patches can be applied to compiled programs to alter the contents of code or<br />

data. The program needs a way of verifying its integrity at runtime.<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.<br />

Detecting Modification | 653

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!