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.

12.1 Understanding the <strong>Problem</strong> of Software<br />

Protection<br />

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

You are considering adding protection to your software to help prevent crackers<br />

from illegally using your software, discovering how your software works, modifying<br />

the way in which your software works, or for a variety of other possible reasons.<br />

Before investing the time and effort, you would like to understand more about software<br />

protection.<br />

Solution<br />

The problem of protection boils down to determining whether the operating conditions<br />

for the software are met. This can mean that the user is allowed to run the software,<br />

that the machine is licensed to run the software, that the software has not been<br />

modified, or that the software is running in a reasonably secure environment (e.g.,<br />

no debuggers are present).<br />

There are a number of different approaches to software protection:<br />

Input validation<br />

Critical code or data is provided as input to the program, and the correctness of<br />

this input determines whether the program will execute correctly. This input can<br />

be a key supplied by the user or a “key file” generated during the install process,<br />

often used to decrypt portions of the file at runtime. Input validation can be<br />

bypassed by obtaining valid input or by removing the dependency on the input.<br />

Hardware validation<br />

A piece of hardware is used to determine whether the program will execute correctly,<br />

effectively tying the program to a single machine. This usually involves<br />

storing critical code or data on a piece of dedicated hardware, checking hardware<br />

serial numbers such as those stored on hard drives and CPUs, or checking<br />

the value of the real-time clock. Hardware validation can be bypassed by removing<br />

the hardware dependency or by emulating the hardware itself.<br />

Network validation<br />

A remote server determines whether the program will execute and provides critical<br />

code or data upon successful validation. Network validation can be bypassed<br />

by removing the network dependency or by running the application on a controlled<br />

local network.<br />

Environment validation<br />

A check of the local system is performed by examining the memory and disk<br />

drives of the system, querying operating system variables, and performing archi-<br />

648 | 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!