Posted March 9, 201312 yr hi all. before reading Excuse me for my poor English. i want to detect if my program opened with a Debuger in Delphi. i found a few code in other website ,but thats not work true! please help me.
March 10, 201312 yr search for anti-debugging techniques in the forum, you will get your answer. Edited March 10, 201312 yr by Kingstaa
March 10, 201312 yr @ Sam7sam7specifically write your problem in detail and with the attached file for testing
March 13, 201312 yr Author thank you for help I used the "IsDebuggerPresent" function in my app but this not work in OllyDbg!!! my problem solved with this function procedure AntiDebug; var bISDebug: Boolean; begin bISDebug := True; try asm INT 2Dh nop end; except bISDebug := False; end; if bISDebug then TerminateProcess(GetCurrentProcess, 0) end; Edited March 13, 201312 yr by Sam7sam7
March 14, 201312 yr This simple debugger detection can be killed with a simple one byte patch...Its really easy to bypass this...
March 28, 201312 yr Author This simple debugger detection can be killed with a simple one byte patch... Its really easy to bypass this... can you give me a better way ?
March 28, 201312 yr Sam7sam7 you can convert this for c++? Using: bool Example(){__asm{ INT 2Dh nop }}
March 29, 201312 yr Author Sam7sam7 you can convert this for c++? Using: bool Example(){__asm{ INT 2Dh nop }}I wrote the following function in delphi but when i open my app in ollydbg can't detect it!!{ ------------------------------------------------------------------------------- + Function : Int2D_DBG + DateTime : 2013.03.28 + Result : Bool ------------------------------------------------------------------------------- }Function Int2D_DBG(): Bool;{ Exception Based Anti-Debugging }ASM mov Result,$0 // Return False@@_TRY : pushad mov esi, offset @@_Handler push esi push FS:[0] mov FS:[0], ESP // --------------------- int 2Dh nop // ---------------------@@_EXCEPT: mov Result,$1 // Return True jmp @@_NoException@@_Handler: mov esp, [esp + 8] pop dword ptr fs:[0] add esp, 4 popad@@_TRY_END : jmp @@_ExceptionHandled@@_NoException: pop dword ptr fs:[0] add esp, 32 + 4@@_ExceptionHandled:End;example of use : if Int2D_DBG = True then ShowMessage('IS DBG') else ShowMessage('Is not DBG'); Edited November 28, 201311 yr by Sam7sam7
Create an account or sign in to comment