Getting Started with Windows 10 Remote Kernel Debugging

| 2 min read

Have you seen Windows Blue Screen of Death (BSOD)? Do you want to know what was the cause of the BSOD? If you answer Yes to any one of the question you need to perform Windows Remote Debugging.

Today we will create setup to perform windows kernel debugging with Windows 10 as debugger and debuggee using VirtualBox using host-only network.

Requirements

VM Configuration

Debugger Configuration:

TypeValue
HostnameDebugger
IP Address192.168.56.102 (VBox host-only network)

Debuggee Configuration:

TypeValue
HostnameDebuggee
IP Address192.168.56.101 (VBox host-only network)

Setting Up the Debuggee

Run Command Prompt as Administrator and execute:

bcdedit.exe /debug on
bcdedit.exe /dbgsettings net hostip:192.168.56.102 port:50000 key:kernel.debugging.is.fun

To find the bus params of the network interface, open Device Manager, expand “Network adapters” and check the Location in properties.

Then run:

bcdedit /set {dbgsettings} busparams 0.8.0

Setting Up the Debugger

  1. Start the Debugger VM
  2. Start WinDbg (x64) from C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe
  3. Select File → Kernel Debug (or Ctrl + K)
  4. Enter the key “kernel.debugging.is.fun” and keep port as 50000
  5. Allow Windows Security Alert for public and private network access

Connecting

Now start the debuggee VM and you should see the connection establishment in WinDbg window.

Success! Now we can debug device drivers and investigate BSOD crashes!


Resources

The quieter you become, the more you are able to hear.

~Amit