Panemuckl
July 4th, 2004, 11:29
Hi!
Intro
To get familiar on rebuilding import tables, I've coded a simple application that basically just shows a form:
SIMPLEAPI.EXE OEP: 0x10E0.
Loding simpleapi.exe in ImpRec, click "IAT Autosearch".
Since I've entered the correct OEP and the import table is just fine (not screwed up by some packer), it should be easy to locate it.
Autosearch:
Set RVA = 0x12100, size = 0xB8 (how's that???)
-> Located (only) 1 library: kernel32.dll.
Okay, lets try it manual:
Set RVA = 0x12000, size = 0x1000
-> Now it found 3 DLLs ("valid:Yes"
, but it also shows off lot of trash: 101 unresolved pointers ("valid: No"
.
How can this happen? Why does ImpRec show an invalid thunk between 2 valid thunks (Kernel32.dll - ?trash? - GDI32.DLL)? If you follow the raw offsets in the file you won't find that invalid thunk!
Hopefully someone will enlight me.
Intro
To get familiar on rebuilding import tables, I've coded a simple application that basically just shows a form:
Code:
// main code
hWnd = CreateWindow( szAppName,
"Title",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
400,
300,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hWnd, iCmdShow);
SIMPLEAPI.EXE OEP: 0x10E0.
Loding simpleapi.exe in ImpRec, click "IAT Autosearch".
Since I've entered the correct OEP and the import table is just fine (not screwed up by some packer), it should be easy to locate it.
Autosearch:
Set RVA = 0x12100, size = 0xB8 (how's that???)
-> Located (only) 1 library: kernel32.dll.
Okay, lets try it manual:
Set RVA = 0x12000, size = 0x1000
-> Now it found 3 DLLs ("valid:Yes"


How can this happen? Why does ImpRec show an invalid thunk between 2 valid thunks (Kernel32.dll - ?trash? - GDI32.DLL)? If you follow the raw offsets in the file you won't find that invalid thunk!
Hopefully someone will enlight me.