First you need to know: A program can never be completely secure.
There's a lot of techniques though, that can help you to protect your program better, and make it harder for peoples to crack it. Everything have its consequences, so if you try to make your program more secure in some way, it can affect the CPU usage, code-size, robustness, etc. of your program.
To protect your program is also hard, because different debuggers or tools, works in different ways. That means you sometimes have to identify which tool your program is running through, and then use a special protection against it. So, let's say there's three working debuggers in the whole world (not quite true...): A, B and C. Some of them maybe works pretty different, let's say A and C. If your program is then running, using one of the debuggers, you've to identify if it's A, B or C. If it's C, you use a special mechanism to protect your program, and if it's A, you use another. There's some techniques that usually works all-around, though.
There's three major ways to protect your code. Each of the ways have several sub-ways to do it, in different ways. The three ways are: Elimination of symbolic information, Program obfuscation and Anti-debugging code.
|