Tutorial on basic function hooking by Patrickssj6
In this tutorial we are going to use C++ and injection DLL to hook the function which updates the time inside MS Minesweeper.
In this tutorial we are going to use C++ and injection DLL to hook the function which updates the time inside MS Minesweeper.
http://www.vivid-abstractions.net/downloads/InDem%20Present/Hooking%20Tutorial.htm
http://www.vivid-abstractions.net/downloads/InDem%20Present/Hooking%20Tutorial.htm
Full screen video
The hooking function:
void WriteJMP(byte* location, byte* newFunction){
DWORD dwOldProtection;
VirtualProtect(location, 5, PAGE_EXECUTE_READWRITE, &dwOldProtection);
location[0] = 0xE9;
*((dword*)(location + 1)) = (dword)(newFunction - location) - 5;
VirtualProtect(location, 5, dwOldProtection, &dwOldProtection);
}
DWORD dwOldProtection;
VirtualProtect(location, 5, PAGE_EXECUTE_READWRITE, &dwOldProtection);
location[0] = 0xE9;
*((dword*)(location + 1)) = (dword)(newFunction - location) - 5;
VirtualProtect(location, 5, dwOldProtection, &dwOldProtection);
}
0 comentarios:
Publicar un comentario