-
-
[求助]hook inject问题,不知是否和数据段属性相关?
-
发表于:
2006-7-17 17:37
4443
-
[求助]hook inject问题,不知是否和数据段属性相关?
写了一dll完成函数RtlFreeHeap的hook 。
DllMain ()
{
case DLL_PROCESS_ATTACH:
hook() ;//实现RtlFreeHeap的hook
..........
}
hook()
{
strncpy( api_RtlFreeHeap.ModuleName, "ntdll.dll", 16 );
strncpy( api_RtlFreeHeap.ApiName,"RtlFreeHeap", 16);
hook_api_RtlFreeHeap= new CHookApi_Jmp( api_RtlFreeHeap.ModuleName, api_RtlFreeHeap.ApiName, reinterpret_cast <FARPROC> (My_RtlFreeHeap) );
api_RtlFreeHeap.MyFunc = reinterpret_cast <FARPROC>(&hook_api_RtlFreeHeap->m_OldFunc[0]);
return true;
}
__declspec (naked)BOOLEAN WINAPI My_RtlFreeHeap( HANDLE hHeap,ULONG dwFlags, PVOID pAddress)
{
__asm{
}
}
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)