*new* ASPR v1.3x ?
===================
Finally I had a chance to play with Alexey's new aspr release
on that lame target from Eld*s site :-
1st thing to note for us poor guys is the demise of POPAD + JMP EAX (61 FF E0) as the
clue to getting to OEiP.
instead we have something like this :-
0167:013A4EA4 E800000000 CALL 013A4EA9
0167:013A4EA9 5D POP EBP
0167:013A4EAA 81EDBD6F4900 SUB EBP,00496FBD
0167:013A4EB0 8D8DD16F4900 LEA ECX,[EBP+00496FD1]
0167:013A4EB6 03CB ADD ECX,EBX
0167:013A4EB8 894101 MOV [ECX+01],EAX
0167:013A4EBB EB00 JMP 013A4EBD
0167:013A4EBD 55 PUSH EBP <-part of Original EXE !!!
0167:013A4EBE 8BEC MOV EBP,ESP
0167:013A4EC0 83C4F4 ADD ESP,-0C
0167:013A4EC3 53 PUSH EBX
0167:013A4EC4 56 PUSH ESI
0167:013A4EC5 57 PUSH EDI
0167:013A4EC6 B838126200 MOV EAX,00621238
0167:013A4ECB 68DE196200 PUSH 006219DE <- OEiP ???
0167:013A4ED0 C3 RET
Note that SEVERAL 1st bits of codse are here also !!! (thanks Evaluator)
Also note that the 'double-dipping' scheme is still present .... so extra care to be taken

Next is the BEAUTIFULLY coded *new* *rebased* and *randomized* IAT re-director
enc/decryption to the real re-director code. This I have to say is a great
programming achievement from Alexey - well I have to say that cos i'm gonna show
you how to bust it
The code is an attempt to stop the IAT tracer from RV/ImpREC......
For RV's Tsehp tracer, RV managed to find a lot of API, but
unfortunately it does NOT have a 'cut-thunk' feature as the IAT is ONE LONG
muther fucker without any 00000000 spaces to define one dll from the next.
Imprec has this feature but unfortunately COMPLETELY FAILS to trace any API at
all - for me ?
So the first solution is to wait months for Tsehp and G-Rom to update their
nice toolz for us (coz they are buzy) .... er no, we do it ourselves with a
plugin
Unfortunately the plugin system is lacking the parameters to make a real
'tracer' out of it, but I managed to fix this IAT and here is the procedure :-
1_ run target to OEiP (G <OEiP_address> after SuperBPM/NtDump)
2_ hold with eb fe
3_ start Imprec
4_ resolve the imports (manually find the IT ????)
5_ see only ONE long import !!!
6_ CUT the crap thunks out
eg:-
FThunk: 0022C1F0 NbFunc: 00000400
0 0022C1F0 ? 0000 95298DE7 <-CUT HERE
0 0022C1F4 ? 0000 00F9925C <-fake redirectors to be de-crypted
0 0022C1F8 ? 0000 00F99368 to real re-director.....
0 0022C1FC ? 0000 00F99384
0 0022C200 ? 0000 00F993A0
0 0022C204 ? 0000 00F993C0
0 0022C208 ? 0000 00F993D0
0 0022C20C ? 0000 00F99414
0 0022C210 ? 0000 00F99454
0 0022C214 ? 0000 00F99494
0 0022C218 ? 0000 00F994B0
0 0022C21C ? 0000 00F994CC
0 0022C220 ? 0000 00F994F4
0 0022C224 ? 0000 00F99514
0 0022C228 ? 0000 00F99534
0 0022C22C ? 0000 00F99570
0 0022C230 ? 0000 00F995B0
0 0022C234 ? 0000 00F995EC
0 0022C238 ? 0000 00F9960C
0 0022C23C ? 0000 00F9962C
0 0022C240 ? 0000 00F99674
0 0022C244 ? 0000 00F80F18
0 0022C248 ? 0000 00F81388
0 0022C24C ? 0000 00F9969C
0 0022C250 ? 0000 00F996BC
0 0022C254 ? 0000 00F996DC
0 0022C258 ? 0000 00F813F8
0 0022C25C ? 0000 00F996F8
0 0022C260 ? 0000 00F99718
0 0022C264 ? 0000 00F99758
0 0022C268 ? 0000 00F99794
0 0022C26C ? 0000 00F997D4
0 0022C270 ? 0000 00F99808
0 0022C274 ? 0000 00F99848
0 0022C278 ? 0000 00F99884
0 0022C27C ? 0000 00F998A4
0 0022C280 ? 0000 00F998C8
0 0022C284 ? 0000 00F998E8
0 0022C288 ? 0000 00F99928
0 0022C28C ? 0000 00F99948
0 0022C290 ? 0000 00F9996C
0 0022C294 ? 0000 00F9998C
0 0022C298 ? 0000 00F999AC
0 0022C29C ? 0000 00F999D4
0 0022C2A0 ? 0000 00F999F4
0 0022C2A4 ? 0000 00F99A18
0 0022C2A8 ? 0000 F80AD623 <-CUT HERE!!!
1 0022C2AC user32.dll 011C GetKeyboardType
1 0022C2B0 user32.dll 01B0 LoadStringA
1 0022C2B4 user32.dll 01C4 MessageBoxA
1 0022C2B8 user32.dll 0026 CharNextA
0 0022C2BC ? 0000 33A0E371 <-CUT HERE!!!
1 0022C2C0 advapi32.dll 01AD RegQueryValueExA
1 0022C2C4 advapi32.dll 01A3 RegOpenKeyExA
1 0022C2C8 advapi32.dll 018A RegCloseKey
0 0022C2CC ? 0000 0151B35D <-CUT HERE!!!
1 0022C2D0 oleaut32.dll 0093 VariantChangeTypeEx
1 0022C2D4 oleaut32.dll 000B VariantCopyInd
1 0022C2D8 oleaut32.dll 0009 VariantClear
1 0022C2DC oleaut32.dll 0007 SysStringLen
1 0022C2E0 oleaut32.dll 0006 SysFreeString
1 0022C2E4 oleaut32.dll 0005 SysReAllocStringLen
1 0022C2E8 oleaut32.dll 0004 SysAllocStringLen
0 0022C2EC ? 0000 98DE7654 <-CUT HERE!!!
0 0022C2F0 ? 0000 00F99A40
0 0022C2F4 ? 0000 00F99A64
0 0022C2F8 ? 0000 00F99AA4
0 0022C2FC ? 0000 00F81388
0 0022C300 ? 0000 00F99ACC
0 0022C304 ? 0000 277D6D43 <-CUT HERE!!!... etc etc etc for all imports.
etc etc
save your 'tree.txt'
8_ Now using my alpha release of'aspr13.dll' plugin select the fake re-directed calls. Imprec will say FAILED
but SAVE and immediately RELOAD the 'tree.txt' and select them again and select 'Trace Level1 (Disasm)'
and voila,API calls appear..SAVE the tree.txt....
You still have to figure out the GetVersion/GetCommandLine/LoadResource etc etc API manually.
Rebuild the IAT in the usual way and your done.
I enclosed some GIF piccy's + plugin dll to explain the procedure.........I hope that helps the blind ones !
Greetz to all, esp. Alexey. Nice new aspr work for a 'lazy guy' uh
Spl/\j
[c]2002