1.
Bypassing SSDT driver Protection
A, remove page protection
B, write in the line hook code
C, with OD additional test effect
D, anti-hook code
"190" Copy the code for lesson 20th
"315" relates to the protection of the page ==> involves a special register
cr0,32 bit register ==> where the 17th bit (starting from No. 0 bit) ==> CW bit
"480" CW bit: 1--Turn on page protection
0--minus page protection
"530" This is just a way (to modify the CW bit of the CR0), and another is to modify the memory descriptor (MDL) (the related function also said before, you can change the page protection properties, the more detailed more professional point)
"580" with CR0 (CW bit) to remove page protection, more convenient
"660" Method:
(Not (1 shl)) & CR0
"935" instruction "CLI" ==> switch off the corresponding interrupt to avoid being disturbed while executing our instructions.
#pragma pack (1)
#pragma pack ()
__asm//Remove page protection
{
Cli
MOV eax,cr0
and Eax,not 10000h//and EAX,0FFFEFFFFH
MOV cr0,eax
}
__ASM//Recovery page protection
{
MOV eax,cr0
or eax,10000h//or eax,not 0FFFEFFFFh
MOV cr0,eax
STI//"1145" recovery interrupt
}
"1160" plus cli/sti instruction increases stability
2.
Yjx_driver_021_ Bypass Drive Protection