![]() |
|
#1
|
|||
|
|||
|
Win32 Debug Protection Idea
Goal: Stop out program being debuged by ollydebug (or other win32 debuger).
Method: My idea for this is simple... yet sometimes complex to explain it goes as follows (psudo code): Code:
BEGIN
IF IsDebuggerPresent() THEN
WaitForSingleEvent(SomeEvent);
GOTO Normal Program;
ELSE
CreateProcess();
DebugActiveProcess(SomePID);
CreateEvent(SomeEvent);
LOOP WaitForDebugEvent(&DebugEv, INFINITE);
<Debug Loop Code>
ContinueDebugEvent(DebugEv.dwProcessId, DebugEv.dwThreadId, dwContinueStatus);
DO
END IF
When combined with other anti olly tricks and good program design and algorythm it should make vey annoying to debug. Basicly it works on the fact that an exe can only be debuged by one parent, and it uses IsDebuggerPresent creativly so if someone just blindly says there is no debuger the program will malfunction. or if there is a debugger and its not its self, it will hang because there is no event. very easy to just make the even your self but the point is its somthing differnt and a little tricky. expansions on this idea are very welcome as well as easy work arounds.. anyone know of someone using this idea? ![]() p.s hxxp://msdn.microsoft.com/library/enus/debug/base/creating_a_basic_debugger.asp Nice example and information on the win32 debugging apis. Last edited by nelix; 05-12-2004 at 08:43. Reason: Addition of url |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Debug Me 0.1 (Another debugging protection) | Teerayoot | General Discussion | 25 | 01-15-2005 04:43 |
| Any idea? | annibal | General Discussion | 2 | 09-01-2003 03:09 |