bedrock
March 4th, 2008, 13:48
I've done quite a bit of reading about API hooks, I've taken a look at Detours and a couple of other hooking API's. And the basic procedure i see is:
Inject hooking dll into process (using CreateRemoteThread ?)
Get address of API to hook, store original bytes (5)
Overwrite with jump to hooked function
etc...
However, i basically want to hook all exported functions from a particular dll, also i want to do this in a thread safe way and on a per process basis (not system wide) i have also read about trampolining and suspending all threads whilst the hook is written, and i guess I'm going to have to do something along these lines
Can any of the experts here offer any advice and the best/most practical way to achieve this?
--
bedrock
Inject hooking dll into process (using CreateRemoteThread ?)
Get address of API to hook, store original bytes (5)
Overwrite with jump to hooked function
etc...
However, i basically want to hook all exported functions from a particular dll, also i want to do this in a thread safe way and on a per process basis (not system wide) i have also read about trampolining and suspending all threads whilst the hook is written, and i guess I'm going to have to do something along these lines
Can any of the experts here offer any advice and the best/most practical way to achieve this?
--
bedrock