News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Infinite loop wanted (for real :-)

Started by Magnum, November 27, 2012, 04:15:30 AM

Previous topic - Next topic

Magnum

Does Olly trap this infinite loop automatically ?
I even used jnz.

invoke IsDebuggerPresent ; running in the context of a debugger, the return value is nonzero

jz      short continue_initialization_1

jmp     short infinite_loop_1


infinite_loop_1:
   
jmp infinite_loop_1

continue_initialization_1:

---------------------------------------------

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

qWord

Once started, Olly runs an application until an exception occurs or you paused it.
Also, it is not specified whether IsDebuggerPresent (or any other API) set or clear the zero flag ;-)
MREAL macros - when you need floating point arithmetic while assembling!

dedndave

invoke IsDebuggerPresent ; running in the context of a debugger, the return value is nonzero
test eax,eax

infinite_loop_1:
jnz infinite_loop_1

Magnum

Thanks, the prog works but I am confused.

EAX has zero when run under Olly ?

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

i just went by your comment   :P
Quoteinvoke IsDebuggerPresent ; running in the context of a debugger, the return value is nonzero

here is the MSDN doc...
QuoteReturn value

If the current process is running in the context of a debugger, the return value is nonzero.

If the current process is not running in the context of a debugger, the return value is zero.

Tedd

The call to IsDebuggerPresent is easily patched to always return false; it could even be considered standard practice.

Stop wasting your time ::)
Potato2

ragdog

Right Tedd

IsDebuggerPresent is only an api the get the BeingDebuged from the Peb