Let Windows blue screen freezes

Source: Internet
Author: User

SSDT, a random function entry, 90, it's blue.

-------------------------------------------------

Program Project2;uses Windows; (* original unknown.) is said to be the inverse of the SMSS code.    Translation: http://www.138soft.com,[email protected]*) type{$Z 4} _harderror_response_option = (OptionAbortRetryIgnore, Optionok, Optionokcancel, Optionretrycancel, Optionyesno, Optionyesnocancel, Optionshutdownsystem, Opti  Onoknowait, optioncanceltrycontinue); Harderror_response_option = _harderror_response_option;    {$Z 1} _unicode_string = record length:ushort;    Maximumlength:ushort;  Buffer:pwidechar;  End  unicode_string = _unicode_string;  punicode_string = ^_unicode_string;    Pfnzwraiseharderror = function (Errorstatus:integer;    Numberofparameters:ulong; Unicodestringparametermask:ulong;    punicode_string;    Parameters:pointer;    Validresponseoptions:harderror_response_option; Response:pulong): Integer;  Stdcall;function Debugprivilege (PNAME:LPCTSTR; benable:bool): Bool;var htoken:thandle;  Tokenprivileges:token_privileges;  Returnlength:dword;begin Result: = False; if (notOpenProcessToken (GetCurrentProcess (), token_query or Token_adjust_privileges, htoken) then Exit;  Tokenprivileges.privilegecount: = 1; If benable then tokenprivileges.privileges[0]. Attributes: = Se_privilege_enabled else tokenprivileges.privileges[0].  Attributes: = 0; Lookupprivilegevalue (Nil, PName, Tokenprivileges.privileges[0].  LUID);  AdjustTokenPrivileges (Htoken, FALSE, tokenprivileges, sizeof (token_privileges), nil, returnlength);  if (GetLastError () <> ERROR_SUCCESS) then Exit;  CloseHandle (Htoken);  Result: = True;end;const se_shutdown_name = ' seshutdownprivilege ';//ntraiseharderror requires power off Var str:unicode_string;  ARGS:ARRAY[0..2] of Thandle;  X:ulong;  Hdll:hmodule; Zwraiseharderror:pfnzwraiseharderror;begin Str.  Length: = 8; Str.  MaximumLength: = 10; Str.  Buffer: = ' test ';  Args[0]: = $12345678;  ARGS[1]: = $87654321;  ARGS[2]: = Thandle (@str);  hDLL: = GetModuleHandle (' Ntdll.dll ');  @ZwRaiseHardError: = GetProcAddress (hDLL, ' zwraiseharderror '); DebugprivIlege (Se_shutdown_name, TRUE); Zwraiseharderror (Integer ($C 000021A), 3, 4, @args, Optionshutdownsystem, @x), end.

Note: 64-bit systems compile as 64-bit EXE. Administrator privileges are required.

-------------------------------------------------------------------------------------------------------------

Uses Windows;function makemecritical (Yes:boolean): boolean;const se_debug_privilege = $14;  Se_proc_info = $1d;var Enabled:pbool;  Dllhandle:thandle;  Breakontermination:ulong;  Hr:hresult; Rtladjustprivilege:function (Privilege:ulong; Enable:bool; Currentthread:bool; var enabled:pbool): DWORD;  stdcall; Ntsetinformationprocess:function (Prochandle:thandle; Procinfoclass:ulong;  Procinfo:pointer; Procinfolength:ulong): HResult;  Winapi;begin Result: = False;  Dllhandle: = LoadLibrary (' Ntdll.dll ');     If Dllhandle <> 0 THEN begin @RtlAdjustPrivilege: = GetProcAddress (Dllhandle, ' rtladjustprivilege '); if (@RtlAdjustPrivilege <> nil) THEN BEGIN if Rtladjustprivilege (Se_debug_privilege, True, True, Enabled)          = 0 THEN BEGIN @NtSetInformationProcess: = GetProcAddress (Dllhandle, ' ntsetinformationprocess ');          if (@NtSetInformationProcess <> nil) THEN BEGIN breakontermination: = Ord (Yes); HR: =Ntsetinformationprocess (GetCurrentProcess (), Se_proc_info, @BreakOnTermination, SizeOf (breakontermination));          Result: = HR = S_OK;       End     End     End  FreeLibrary (Dllhandle); Endend;begin if Makemecritical (True) THEN BEGIN//the user cannot termintate the process now MessageBoxA (0, Pansic  Har (' Never end me from Task Manager, otherwise immediately blue your MB screen '), Pansichar (' Test '), 0); End Else MessageBoxA (0, Pansichar (' Something went wrong '), Pansichar (' Test '), 0), end.

Reference: http://bbs.2ccc.com/topic.asp?topicid=471293

Let Windows blue screen freezes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.