From Collaborative RCE Tool Library
Ultimate Hooking Engine
| Tool name: | Ultimate Hooking Engine |
|
||
|---|---|---|---|---|
| Author: | deroko of ARTeam | |||
| Website: | http://deroko.phearless.org | |||
| Current version: | ||||
| Last updated: | August 10, 2007 | |||
| Direct D/L link: | Locally archived copy | |||
| License type: | Free | |||
| Description: | Engine allows anyone to hook APIs very easily using their hooking dll. Each hooking dll might have 3 types of exports: 1. prefixed HOOK 2. prefixed Detoured 3. hookmain (optional) 1. Whenever you want to hook some API you will put this kind of export: HOOK_kernel32_GetModuleHandleA HOOK_user32_MessageBoxA Also note that inline hook will point to this procedure so this procedure will have all of your code responsible for certain API. 2. To be able to call original API from your hook you should export also this variable (in C/C++ it will be function pointer): Note how variables are prefixed with "Detoured_" Detoured_GetModuleHandleA Detoured_MessageBoxA Here is one example from C/C++ code: extern "C" __declspec(dllexport) HMODULE (__stdcall *Detoured_GetModuleHandleA)(LPCTSTR modulename) = NULL; extern "C" HMODULE __declspec(dllexport) __stdcall HOOK_kernel32_GetModuleHandleA(LPCTSTR modulename){ return Detoured_GetModuleHandleA(modulename); } Note also that this is optional, if you don't need to call orignal proc, then you don't need this export. Note that when working with MSVC2005 it will always screw export name for procedures while function pointers are properly exported, so add this line to your .def file: HOOK_kernel32_GetModuleHandleA = _HOOK_kernel32_GetModuleHandleA@4 Detoured_GetModuleHandleA 3. hookmain hookmain is export which has this prototype: void __stdcall hookmain(); This procedure will be called before program jumps to entrypoint of target, here you may add some extra code, it isn't very useful and all initialization you may perfrom in DllEntry, but I leave this here just in case that you want to start your own tracer before code jmps to entrypoint. At least that's why I'm using it. |
|||
| Related URLs: | No related URLs have been submitted for this tool yet | |||
Feed containing all updates for this tool.
(please also edit it if you think it fits well in some additional category, since this can also be controlled)
You are welcome to add your own useful notes about this tool, for others to see!