I saw an interesting trick on the i386: Some code intentionally updated the very next instruction. If you just ran it, the next instruction was already prefetched so the program worked. If you single stepped it, the next instruction was in the INT 1 handler, so the debugger ran the modified instruction. This way, your program knew it was being debugged, and could take countermeasured