Quote:
Originally Posted by Jeoni
You cannot simply load the correct version of kernel32 depending on the target. If your injector is a 32 bit application, you cannot simply load the 64 bit kernel32.dll and vice versa. You might deploy two injectors and choose one depending on the architecture of the target. The harder approach to really get everything into one application is to write a 32 bit application which breaks the WOW64 emulation layer to also execute 64 bit code, load kernel32 in the 64 bit environment and inject your 64 bit dll in the 64 bit target using that. Deploying two different applications is easier though.
With best regards
Jeoni
|
Ah, i forgott that to optain the address the library has to be loaded into the current process -.-. But he could simply parse the kernel32.dll for the address (similar like objdump or [insert windows alternative here] work), fetch the base address from kernel32.dll and call this one.
Alternatively, he could only write a small program like
Code:
#include<stdio.h>
#include<libloaderapi.h> // windows.h?
int main()
{ printf("%p", &LoadLibraryA);
return 0; }
And compile it for x64 and x86_64 so he only needs to call this program to get the address, while the main functionality could still be in an x86_64 vb program