21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The threat of protection crackers<br />

Software is rarely cracked for profit. It is cracked because the protection is trivial<br />

(“Why crack it? Because I can”), because the software itself is in demand (“crack<br />

requests” and “zero-day warez”), or because the protection is interesting, often<br />

sheerly because it is difficult (this is “reverse engineering” for sport). Protecting<br />

against every type of attacker is impossible. Instead, we recommend that you determine<br />

which type of attacker poses the greatest threat.<br />

If your software is popular and has a high demand, you will want to defend against<br />

the “zero-day” cracker by making the crack itself take a long time to produce. The<br />

goal here is to sell more copies of the application in the time between when the software<br />

is released and when the crack is produced. The crack can be made to take<br />

longer in a variety of ways. Distributing validation checks requires that more locations<br />

be patched and thereby increases the complexity of the crack. Delaying the<br />

effects of a failed validation increases the probability that incomplete cracks will be<br />

produced. Performing supplemental validation checks in areas of the program that<br />

are used only by the “power user” of your software can also be effective because<br />

most crackers know little or nothing about the software they crack and use only the<br />

basic feature set when testing their crack. The rule of thumb for this type of software<br />

is to hide the protection itself and provide “red herring” protections, which are<br />

slightly difficult to defeat, and which appear to be responsible for the security of the<br />

application. Anti-debugger code, hardware validation, and network validation all fail<br />

here as they only serve to draw attention to the protection itself.<br />

If your software is released frequently and/or has a low cost or a relatively small user<br />

base, you will want to defend against the “because I can” cracker by increasing the<br />

skill needed to crack your program. This way, users of your software will find it more<br />

reasonable to purchase your software than to crack it. Encrypting or packing the<br />

software can do this by including anti-debugger code and by making the code of the<br />

protection itself tedious to debug and disassemble (e.g., by incorporating a lot of<br />

irrelevant mathematical transformations, breaking the protection up into numerous<br />

small subroutines, and repeatedly moving variables around on the stack and in memory).<br />

In this situation, there is little need for outwitting the cracker with this type of<br />

software, as heavy-duty protection would come at too great a software development<br />

cost. Instead, focus your protection efforts on frustrating the casual or inexperienced<br />

cracker.<br />

If your software is genuinely valuable and is more likely to be reverse-engineered for<br />

its algorithms than cracked for purposes of redistribution, you will want to protect<br />

against the “for sport” cracker. In this case, you assume that the value of your software<br />

is in its originality, and therefore that it’s worth spending large amounts of time<br />

and money to protect the software. In such cases, the attacker is usually a professional:<br />

the application is run in a sandboxed environment, the system state is backed<br />

up to recover from hostile code, and replacement hardware is available in case of fail-<br />

650 | Chapter 12: Anti-Tampering<br />

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

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

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

Saved successfully!

Ooh no, something went wrong!