I am currently battling this protection on an 32-bit executable.
At some point during it's runtime, the protection gets the address of DbgUiRemoteBreakin
and writes a JMP
to ExitProcess
as an anti-attach technique. I decided to place a memory breakpoint on write(I also tried access) on that location figuring at the very least I'd find out what piece of code alters the code. Upon setting the breakpoint I hit F9 only for my memory bp to never be triggered, I tried multiple times. The code was altered, but my memory bp was not triggered. This is the first time that a memory breakpoint was not triggered for me. I am puzzled as to why this has happened. My only guess is that DbgUiRemoteBreakin
is located in ntdll.dll and that is why guard pages don't work there.
There were also instances where I had a crash when I set a memory bp on that function.
However I am hoping somebody has encountered this and can explain more in depth. My ollydbg version is 1.10.