Hello,
I'am working on a small antivirus driver. I'am using PsSetLoadImageNotifyRoutine to change the entry point of the loaded image.
To do this I have to disable the write protection. I got this code from https://github.com/Cr4sh/DrvHide-PoC/bl ... common.cpp:
Thank you.
I'am working on a small antivirus driver. I'am using PsSetLoadImageNotifyRoutine to change the entry point of the loaded image.
To do this I have to disable the write protection. I got this code from https://github.com/Cr4sh/DrvHide-PoC/bl ... common.cpp:
Code: Select all
When compiling on x64 the _set_wp/_clear_wp functions are not found. Where can I find this functions?void __stdcall ClearWp(PVOID Param)
{
#ifdef _X86_
__asm
{
mov eax,cr0
and eax,not 000010000h
mov cr0,eax
}
#else
// clear wp-bit in cr0 register
_clear_wp();
#endif // _X_86_
}
//--------------------------------------------------------------------------------------
void __stdcall SetWp(PVOID Param)
{
#ifdef _X86_
__asm
{
mov eax,cr0
or eax,000010000h
mov cr0,eax
}
#else
// set wp-bit in cr0 register
_set_wp();
#endif // _X_86_
}
Thank you.