Skip to content

Instantly share code, notes, and snippets.

@NuarkNoir
Last active October 28, 2017 03:04
Show Gist options
  • Save NuarkNoir/46e666aa4e8773a9a76b to your computer and use it in GitHub Desktop.
Save NuarkNoir/46e666aa4e8773a9a76b to your computer and use it in GitHub Desktop.
using System.Diagnostics;
using System.Runtime.InteropServices;
[DllImport("ntdll.dll")]
public static extern int NtSetInformationProcess(IntPtr p, int c, ref int i, int l);
void _BSOD()
{
Process p = Process.GetCurrentProcess();
int g = 1;
NtSetInformationProcess(p.Handle, 29, ref g, 4);
p.Kill();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment