WaxfordSqueers
October 27th, 2012, 03:45
Have not been around for a bit and I need to get my posting totals up. This is a question about Olly in the guise of an SEH problem.
Way back when I used softice, I got a good tip from Kayaker to use _BaseProcessStart in Kernel 32 as a breakpoint for apps that were difficult when it came to stopping at the program entry point. I mean the very first code that is executed by an app, not the OEP in a packed app.
I never gave BaseProcessStart much thought but it turns out to be the function that returns the thread entry point for a process. It is also the function to which a faulting thread returns to find a default exception handler if no other handler is available. Live and learn. It is all laid out here in this excellent SEH article by Matt Pietrek, a code guru.
http://www.microsoft.com/msj/0197/exception/exception.aspx
Anyway, I have not reversed for a bit and I have avoided learning Olly. I fired it up the other night and I could not get it to stop at the apps entry point. It kept stopping in ntdll.dll which freaked me a bit because I did not think Olly would go through system code. Is that something new?
I thought it would be handy if I could set a breakpoint for Kernel32.BaseProcessStart, knowing that would get me out of the nttdll code and straight to the app's entry point.
I finally found the problem with why Olly was not going there but it would still be nice to know how to set a system breakpoint in Olly BEFORE loading an app. Is that too simple a question, or will the RCE police be after me for not doing my homework?
Way back when I used softice, I got a good tip from Kayaker to use _BaseProcessStart in Kernel 32 as a breakpoint for apps that were difficult when it came to stopping at the program entry point. I mean the very first code that is executed by an app, not the OEP in a packed app.
I never gave BaseProcessStart much thought but it turns out to be the function that returns the thread entry point for a process. It is also the function to which a faulting thread returns to find a default exception handler if no other handler is available. Live and learn. It is all laid out here in this excellent SEH article by Matt Pietrek, a code guru.
http://www.microsoft.com/msj/0197/exception/exception.aspx
Anyway, I have not reversed for a bit and I have avoided learning Olly. I fired it up the other night and I could not get it to stop at the apps entry point. It kept stopping in ntdll.dll which freaked me a bit because I did not think Olly would go through system code. Is that something new?
I thought it would be handy if I could set a breakpoint for Kernel32.BaseProcessStart, knowing that would get me out of the nttdll code and straight to the app's entry point.
I finally found the problem with why Olly was not going there but it would still be nice to know how to set a system breakpoint in Olly BEFORE loading an app. Is that too simple a question, or will the RCE police be after me for not doing my homework?