📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Brainstorms - General  >>  a packed exe file, can't pause at the EP

Topic created on: April 18, 2008 08:34 CDT by kcynice .

i have a packed exe file with a unknown packer, so i have to unpack it by hands. But when i open it using OllyDbg, it can't pause at the EP, OD has running status. Here, the exe has not a GUI, so i can see nothing. This exe file is attached to another program, when the other program(main program) start, this exe would be invoked. I want to use od to attach this sub-process, but i can't find it in the attach window of OD, although i can see both of the two process in task manager's process list. So, i want to know why? and how to resolve it?Thanks.

If i use OllyDbg to open it, i can do nothing, even to insert a breakpoint. So, I load it using Syser. Good, Syser can pause at the entrypoint, I can find the OEP successfully. When the control want to jump to the OEP, i modify the code to a endless loop. Then i return to Windows and want to dump it using PETools, but unfortunately, the process has exited. So, I can do nothing as normal.

So, after Syser load the program, I press F5 to return Windows, I can dump the program's memory using PETools. Then, I open ImportREC and input the OEP i have found, good, it afford to fix the dumped file successfully.

But the unpacked exe file can't replace the original one, if i did, the main program(the caller, which invoke the program) will be encounter a fatal error and have to closed. I can open my unpacked exe file using OllyDbg now, but when i press F9 to run the program, OllyDbg will pause one time after one time, it says "Debugged program was unable to process exceptions".

I want to know, what's wrong with it? How to dump such a program's memory when it goes to its OEP?
Thanks

Regards,

  nezumi     April 23, 2008 00:32.39 CDT
there are so many ways how to execute some code before EntryPoint.
TLS-callbacks - well-know tricks.
another one - statically loaded dll with DllMain
does something to defeat your favorite debugger :)
for example: reloading exe with LoadLibrary to the different location and passing control to it.
to answer your question I need to have the file. upload it somewhere if you can and give me the link

  kcynice   May 5, 2008 01:42.13 CDT
I am sorry for relpying so late.
I found the problem is only for my computer. The file can be loaded normally on another computer. The same version of OllyDbg. I am not sure why.
But it really can pause at the EP, now.
Thanks

  nezumi     May 5, 2008 01:55.32 CDT
I know many malware and a few fair programs that intercept file-loading, conflicting with a debugger. and I know some protections that install the kernel driver does the same. if the driver starts with OS and actives all the time (not only during working the protected program) this causes side effect like you have described. so, check your OS.

btw, debugging programs on the base OS isn't a good idea. keep your base OS clean, use virtual machines as often as it's only possible.

  kcynice   May 13, 2008 01:25.11 CDT
OK. I accept your advice and have a virtual machines intalled now.

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit