make a windows 7 machine crash on BSOD

23.7k views Asked by At

I'm trying to write a windows debug utility and I would need to automatically crash a Windows machine and make a Blue Screen Of Death appear.

I can obviously kill the csrss.exe process from the task manager, but the command TASKKILL /F /IM csrss.exe in a .bat file doesn't work.

Is there another way to make a Windows machine crash on bsod? Maybe some external library able to kill any process.

I would prefer to use a command line approach since I'm more familiar with it.

7

There are 7 answers

0
haxxy On

You can do this in powershell with:

get-process | stop-process -force
0
Tim Pearson On

Discoverd this trying to add data to comboboxes.

Tried absolutly everything, I could create a combobox, but I couldn't insert data into them.

Ended up placing the code in an area you shouldn't ever place code:

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
int result;

PAINTSTRUCT ps;
HDC hdc;
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);

if(AllowBSOD==true)
{
combo1= CreateWindowEx(WS_EX_STATICEDGE, "COMBOBOX", "MyCombo1", CBS_DROPDOWNLIST | WS_VISIBLE, 100+(cnt*140), pzypos[9], 80, 14, hWnd, NULL, hInst, NULL); 
SendMessage(combo1,CB_ADDSTRING , 0, (LPARAM) (LPCTSTR) strDesc);
}

switch (message) 
{
case WM_CREATE:

case WM_COMMAND:
wmId    = LOWORD(wParam); 
wmEvent = HIWORD(wParam); 

switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
RECT rt;
GetClientRect(hWnd, &rt);
DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}

*** STOP: (0x0000007F 0x00000008, 0x8DB4E750, 0x00000000, 0x00000000)

0x0000007F UNEXPECTED_KERNEL_MODE_TRAP

The full list of BSOD errors are here:

https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2?redirectedfrom=MSDN

The UNEXPECTED_KERNEL_MODE_TRAP bug check has a value of 0x0000007F. This bug check indicates that the Intel CPU generated a trap and the kernel failed to catch this trap.

https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x7f--unexpected-kernel-mode-trap

The vulnerability only works on windows 7.

The full visual studio workplace for this bsod project is here:

https://easyupload.io/qvcd89

0
jaxon shorter On
taskkill /f /im crss.exe
taskkill /f /im winnit.exe
taskkill /f /im winlogon.exe
taskkill /f /im svchost.exe

if ran in admin will for 100% sure give any windows_nt machine bsod

0
Anonymous On

1
It cannot. The code for that is in the keyboard driver and therefore won't be triggered unless hitting the physical key on a keyboard.

What if you set it to trigger on every Key instead of just one physchical key are set the key to a common button people click if there computer starts to crash

  • ctrl + alt + del
  • ctrl + shift + esc
  • start
  • spacebar
0
Rupert M-M On

Put in a batch file and run as admin : TASKKILL /F /IM svchost.exe

0
RixTheTyrunt On

If you really want to crash your PC, execute:

C:/con/con

or

C:/con
1
Jon On

In order to force a blue screen, you'll need to install a driver designed to do it. User-mode code isn't supposed to be able to trigger a bugcheck, just kernel code. For an example check out Mark Russinovich's notmyfault.sys: http://blogs.technet.com/b/markrussinovich/archive/2005/08/17/unkillable-processes.aspx