Getting a debug break point in WinDBG/VMWare

c++ / delphi package - dll injection and api hooking

Getting a debug break point in WinDBG/VMWare

Postby alfaunits » Thu Jun 16, 2016 4:19 pm

As a debugging technique, I am trying to get the hook DLLs to trigger a debug break point. The DLLs are tested inside VMs (VMWare) and WinDBG is attached to the VM for kernel debugging/exe. This also allows me to somewhat debug the DLLs.

Does anyone know how I can trigger a debug break point from my DLL (in code, using DebugBreak() call), that does NOT send back the exception back to the app itself, forcing a close?
Namely, if my code calls DebugBreak() (even inside a try/except block), once I leave WinDBG, the exception gets propagated to the app the DLL is injected into :(
alfaunits
 
Posts: 21
Joined: Sat Apr 09, 2011 9:41 pm

Re: Getting a debug break point in WinDBG/VMWare

Postby madshi » Thu Jun 16, 2016 5:10 pm

I would have thought a try..except end (Delphi) or __try..__except (1) (C++) block would do the trick. If that doesn't work then I don't know.
madshi
Site Admin
 
Posts: 9412
Joined: Sun Mar 21, 2004 5:25 pm

Re: Getting a debug break point in WinDBG/VMWare

Postby alfaunits » Thu Jun 23, 2016 3:46 pm

I actually don't have a Delphi, but C DLL, though the try/except is the same thing.
It doesn't work, once WinDBG is triggered, as soon as I am out of the DebugBreak() call, the exception gets propagated to the application, and is not captured by try/except.
alfaunits
 
Posts: 21
Joined: Sat Apr 09, 2011 9:41 pm


Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 8 guests