[GD-General] Is it possible to detect debugging?
Brought to you by:
vexxed72
From: Colin F. <cp...@ea...> - 2003-10-09 17:10:20
|
Can a Windows application determine if it is being debugged? Naturally it can't do anything if it has been suspended at a breakpoint, but I'm wondering if there is a way, during execution, to check for debugging. Sorry, it has been a while since I was in to Windows process information stuff, so I forget all the cool things a process can do. Anyhow, let's say the application is started. Meanwhile, something like Visual C++ has already been started, or is now started. Some time during the execution of the application, the user of Visual C++ uses the "Attach to Process..." option, and selects the application. Is there any way for the application to detect that it is being debugged, assuming it has not been immediately paused? The method cannot depend on any particular debugger (like checking for certain states of, say, Visual Studio). But I assume that many debuggers work the same way -- although the 1337 haX0r might run the whole app in an 80x86 emulator... I don't really have any particular objective, like popping up a dialog to embarrass the first haX0r who attempts to crack my application. I'm just making conversation. Relax! Talk amongst yourselves! --- Colin cp...@ea... |