驱动保护HOOK分析
用XT可以看到NTReadVirtualMemory NTWRiteVirtualMemory NTAllocateVirtualMemory 被inline hook了,以下为函数源代码。也就是需要恢复的代码。
NTReadVirtualMemory 0x805B52C2
push 1C
push 804DAEF0
call 8053CBE0
mov eax, dword ptr fs:[124]
mov edi, eax
mov al, byte ptr [edi+140]
mov byte ptr [ebp-20], al
mov esi, dword ptr [ebp+14]
test al, al
je short 805B534C 应跳转至0X805B52E4继续执行 HOOK 32字节NTReadVirtualMemory +0x22
--------------------
NTReadVirtualMemory HOOK后
jmp 88E52C20
dec ebp
sub al, 12
jns short 805B52C5
jmp dword ptr [ecx+24]
add dword ptr [eax], eax
add byte ptr [ebx+40878AF8], cl
add dword ptr [eax], eax
add byte ptr [eax+758BE045], cl
adc al, 84
Invalid Command
je short 805B534C
-------------------------
NTWRiteVirtualMemory 0x805B53CC
push 1C
push 804DAF08
call 8053CBE0
mov eax, dword ptr fs:[124]
mov edi, eax
mov al, byte ptr [edi+140]
mov byte ptr [ebp-20], al
mov esi, dword ptr [ebp+14]
test al, al
je short 80565456应跳转到0x805B53EE继续执行 NTWRiteVirtualMemory+0x22
-------------------
NTWRiteVirtualMemory HOOK后
jmp 88E52FB0
dec ebp
sub al, 8
js short 805B53CF
jmp dword ptr [ecx+24]
add dword ptr [eax], eax
add byte ptr [ebx+40878AF8], cl
add dword ptr [eax], eax
add byte ptr [eax+758BE045], cl
adc al, 84
Invalid Command
je short 805B5456
---------------------------------
NTAllocateVirtualMemory 0x805A9ABA
push 118
push 804DACB8 应跳转到0x805A9ABF hook5字节 NTAllocateVirtualMemory +5
----------------
NTAllocateVirtualMemory HOOK 后
jmp 88E53070
push 804DACB8
