Closed lynnux closed 7 years ago
Thanks I added a fix, could you try it again?
@mrexodia, a little improvement: Since the project use VS 2013 to compile, the code can use C++11. There are many Nt* functions not need declaration in undocumented.h/cpp, for example:
static HOOK hNtSetContextThread = 0;
NTSTATUS NTAPI HookNtSetContextThread(IN HANDLE ThreadHandle, IN PCONTEXT ThreadContext)
{
return ((decltype(HookNtSetContextThread)*)(hNtSetContextThread->SSDTaddress))(ThreadHandle, ThreadContext);
}
Might be interesting, could you send a pull request to update those maybe? On Thu, 29 Jun 2017 at 07:59, lynnux notifications@github.com wrote:
@mrexodia https://github.com/mrexodia, a little improvement: Since the project use VS 2013 to compile, the code can use C++11. There are many Nt* functions not need declaration in undocumented.h/cpp, for example:
static HOOK hNtSetContextThread = 0; NTSTATUS NTAPI HookNtSetContextThread(IN HANDLE ThreadHandle, IN PCONTEXT ThreadContext) { return ((decltype(HookNtSetContextThread)*)(hNtSetContextThread->SSDTold))(ThreadHandle, ThreadContext); }
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/mrexodia/TitanHide/issues/24#issuecomment-311870224, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWCmaITSlmxY1S5PAfznuwFcqU2pE75ks5sIz1QgaJpZM4OIydY .
I used the code for SSDT hook in my project, BSOD after unload driver when verifier enabled windbg !analyze -v show:
!verifier 3 xxx.sys show:
Seems on x86, SSDT::Hook called RtlAllocateMemory, but SSDT::Unhook forgot to free it. X64 version using Hooklib::Hook and Hooklib::Unhook seems OK (I'v not tested x64 version).
Maybe fixed by this: