Hook 32-bit and 64-bit processes at the same time

c++ / delphi package - dll injection and api hooking
Post Reply
wassily
Posts: 12
Joined: Sun Dec 16, 2012 6:37 pm

Hook 32-bit and 64-bit processes at the same time

Post by wassily »

I need a global API hook to work for all processes in a x64 Windows 8 system. I based my injector code on the HookProcessCreation sample but even the original DllInjector32.exe OR DllInjector64.exe run exclusively, not parallel. If the 64 bit version is started, LoadInjectionDriver in the 32 bit injector fails and vice versa. What is the proper way to hook both subsystems?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Hook 32-bit and 64-bit processes at the same time

Post by madshi »

The proper way is to use DllInjector64.exe on 64bit OSs to inject both the 32bit and 64bit dlls.
wassily
Posts: 12
Joined: Sun Dec 16, 2012 6:37 pm

Re: Hook 32-bit and 64-bit processes at the same time

Post by wassily »

Und wieder eine "danke schön"!
It is just not obvious that a 64 bit executable can handle a 32 bit dll in InjectLibrary because normally any LoadLibrary or whatever attempts would fail, now that's clear.
Post Reply