Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-12-2004, 08:42
nelix
 
Posts: n/a
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
Somthing along those lines.

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
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


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


All times are GMT +8. The time now is 19:28.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )