阅读:1195回复:4
为什么卸载的时候会蓝屏呢?
OS是win2003 SP1
代码如下,功能是HOOK sysenter: #include "ntddk.h" ULONG d_origKiFastCallEntry; // Original value of ntoskrnl!KiFastCallEntry VOID OnUnload( IN PDRIVER_OBJECT DriverObject ) { DbgPrint("ROOTKIT: OnUnload called\n"); } // Hook function __declspec(naked) MyKiFastCallEntry() { __asm { jmp [d_origKiFastCallEntry] } } NTSTATUS DriverEntry( IN PDRIVER_OBJECT theDriverObject, IN PUNICODE_STRING theRegistryPath ) { theDriverObject->DriverUnload = OnUnload; __asm { mov ecx, 0x176 rdmsr // read the value of the IA32_SYSENTER_EIP register mov d_origKiFastCallEntry, eax mov eax, MyKiFastCallEntry // Hook function address wrmsr // Write to the IA32_SYSENTER_EIP register } return STATUS_SUCCESS; } |
|
沙发#
发布于:2007-01-18 23:43
必蓝
|
|
|
板凳#
发布于:2007-01-19 06:01
没有恢复
|
|
|
地板#
发布于:2007-01-19 12:11
那应该怎么恢复呢?
|
|
地下室#
发布于:2007-01-22 06:31
把你DriverEntry里面做的东西,反过来做一次
|
|
|