#include<ntddk.h>
VOID DriverUnload(IN PDRIVER_OBJECT DriverObject)
{
KdPrint(("Driver Unload is Run!\n"));
}
VOID ShutDown()//实现暴力关机
{
_asm
{
mov ax,2001h;
mov dx,1004h;
out dx,ax; //写入 2001h 到端口 1004h 实现暴力关机
}
}
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject,IN PUNICODE_STRING RegistryPath)
{
KdPrint(("Driver Entry is Run!\n"));
DriverObject -> DriverUnload = DriverUnload;
//汇编中直接写端口0x64完成计算机直接重启操作
__asm {
mov al,0xfe
out 0x64,al
}
return STATUS_SUCCESS;
}
直接写IO端口0x64完成计算机重启操作实现暴力关机
最新推荐文章于 2024-09-18 12:24:22 发布