Is there a way to programmatically cause a BSOD on Windows XP and newer versions? How?
BTW just to clarify, this is not for malicious purposes. The client requested to be able to shut down/reboot a terminal on their LAN this way. When I asked why, they said because it's faster than a normal reboot... :)
(I'm curious which part of "programmatically" do those people not understand who migrated this to Super User. Duh.)
Answer
The keyboard driver(s) can be told to cause a BSOD:
HKLM\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters
or (for older PS/2 keyboards)
HKLM\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters
And there set a REG_DWORD
named CrashOnCtrlScroll
to 1
.
After the next reboot you can force the blue screen by Ctrl+ScrollLk+ScrollLk. The bug check code will in this case be 0xE2 (MANUALLY_INITIATED_CRASH).
If you really want a programmatic method, you need to find a hole in some driver on that machine or write and install a simplistic driver that calls either KeBugCheck
or KeBugCheckEx
.
Have fun ;)
Side-note: it can be very useful to deliberately cause a crash like this for driver writers or even when dealing with malware. If you configured your system to create a full memory dump, you will then have an image of the running system which can be further analyzed. Consider cases like a deadlock where a debugger does not necessarily help in all cases.
Comments
Post a Comment