Created
July 26, 2022 03:26
-
-
Save milksense/adedcd21523b8acaad7eda785b93515d to your computer and use it in GitHub Desktop.
Force BSOD :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int bsod() { | |
BOOLEAN bEnabled; | |
ULONG uResp; | |
LPVOID lpFuncAddress = | |
GetProcAddress(LoadLibraryA("ntdll.dll"), "RtlAdjustPrivilege"); | |
LPVOID lpFuncAddress2 = | |
GetProcAddress(GetModuleHandle(L"ntdll.dll"), "NtRaiseHardError"); | |
pdef_RtlAdjustPrivilege NtCall = (pdef_RtlAdjustPrivilege)lpFuncAddress; | |
pdef_NtRaiseHardError NtCall2 = (pdef_NtRaiseHardError)lpFuncAddress2; | |
NTSTATUS NtRet = NtCall(19, TRUE, FALSE, &bEnabled); | |
NtCall2(STATUS_FLOAT_MULTIPLE_FAULTS, 0, 0, 0, 6, &uResp); | |
return 0; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or
wininit
via PowerShell