PDA

View Full Version : Cuestion Concerning Imprec. 1.6


cRk
March 5th, 2004, 16:30
i did some search and found some Thread about imprec. but those didn't answer my cuestion...

which settings are the best to recover/rebuilt a dumped program/IAT ?

which settings makes/Rebuild IAT for Will ALL

these cuestions came due i couldn't make a program work in both OS .. rebuilded IAT with Imprec from winXP but then dosen't run in Win9x

i see some Unpackers like Aspr. Stripper rebuild good IAT and runs on WinALL

i have to do this manually or still i can do it modifing some settings on Imprec.? how to do this??

Excuse my lame cuestions! i think i'm hungry for knowledge

Regards

prejker
March 5th, 2004, 19:33
a common thing is that when you dump under winxp imprec will resolve Kernel32!SetErrorMode as Kernel32!RestoreLastError which is an alias under winxp. Switch RestoreLastError to SetErrorMode and check if it will work.

nikolatesla20
March 6th, 2004, 02:54
Are you sure you don't mean SetLastError(). That's what gets switched..

hobferret
March 6th, 2004, 08:06
Quote:
[Originally Posted by nikolatesla20]Are you sure you don't mean SetLastError(). That's what gets switched..


Hi nt20

Yes you are right there, also sometimes some of the advapi32.dll references are different

/hobferret

cRk
March 6th, 2004, 17:27


no answers? i see some other API like Oleaut , and other ... might be different and comes the problems for one OS or another with IAT.

what to do?

cRk
March 8th, 2004, 08:54
there have been for about 3 cuestions i have asked on this board ..and none of them have been answered .... people on these days don't like to share knowledge ? . i can't believe noone knows about this.. so i should say it like that

nikolatesla20
March 8th, 2004, 12:05
I've never noticed any Oleaut problems myself..

How I use ImpREC:

"Rebuild All" is a tricky thing to try doing, it's almost never successful. Sometimes if you suspect an API you should trace the IAT entry manually (step thru it with debugger) to see where it really goes. You should always insert the IAT using "Add new section".

The "OEP" entry in ImpREC stinks. If you don't put a valid entry in this field, then you paste on the new IAT table, ImpREC will overwrite the OEP of the file with the junk one you entered. So before you paste in the new IAT section, make sure you have the OEP entered and correct ! The OEP value you need to enter is only the offset, not the whole VA. In other words, if the ImageBase is 0x00400000 (typical) and OEP is 0x00401000, you only need to enter 1000 in the OEP box. If you don't it will be screwed when you paste on the new IAT.


-nt20

esther
March 8th, 2004, 13:31
and OEP is 0x00401000, you only need to enter 1000 in the OEP box.

this has been discussed long time ago.... do a search in the forum....

cRk
March 8th, 2004, 14:21
esther i now you're insame from long time ago but that was not my cuestion ..please read up...

nikolatesla are these options OK ?? check the screenshot

i'm using win9x/XP with all Updates

sometimes i get errors like

Error Starting Program....

the XXXX.exe files is linked to missing export xxxx.dll : .......

that's what i mean...

seven
March 8th, 2004, 19:25
reinstall imprec again coz the default set iz the right set .

nikolatesla20
March 8th, 2004, 23:27
yes, I agree, I never use any of those advanced options, I just use the default settings.

-nt20

TQN
March 9th, 2004, 00:15
Hi cRK !
I was have same problem. After some test, I find the way to workaround. Do not check "Import All by Ordinal". The export ordinals in system DLLs of all OS (Win9x, WinNT...) not same. For example: Export function with ordinal 112 in Kernel32.dll in 9x is difference with export function 112 in Win2K. Uncheck it to import by name.
TQN

cRk
March 9th, 2004, 02:31
thanks for all replies . since now i'll try it with default settings.

Best Regards