In This Chapter
How to avoid becoming a soldier in someone's botnet army
Getting a handle on SQL injection
Understanding buffer overflow hacks
Defensive programming against buffer overflows
Getting a little help from the operating system
In the interest of full disclosure, I should admit right now: I'm not sure that it's possible to write hacker-proof code. Those slippery devils always seem to find a way. But by knowing some of their tricks and how to counter them, you can write programs that are very hacker resistant.
There is more to hacker-proofing that just writing code. Program protection takes a multitude of forms which I describe in Chapter 30. However, since this book is about writing programs, after all, and since code writing is probably the most important component to hacker-proofing, let's start there.
Why would a hacker want to break into one of the lowly C++ console programs presented in this book? ...