Skip to content

Instantly share code, notes, and snippets.

@ahmed-masud
Forked from cji/win_vm_kerneldbg.md
Created August 1, 2020 15:33
Show Gist options
  • Save ahmed-masud/4aa166fbee1015129fa46c24cbd7da26 to your computer and use it in GitHub Desktop.
Save ahmed-masud/4aa166fbee1015129fa46c24cbd7da26 to your computer and use it in GitHub Desktop.
Steps to successfully debug the Windows kernel between 2 VMWare VMs

Open the debugger VM's .vmx file. delete the existing serial0 lines (used for printing, not needed) add these lines:

serial0.present = "TRUE"
serial0.pipe.endPoint = "client"
serial0.fileType = "pipe"
serial0.yieldOnMsrRead = "TRUE"
serial0.tryNoRxLoss = "FALSE"
serial0.startConnected = "TRUE"
serial0.fileName = "/private/tmp/com1"

Repeat for the debugee, but add these lines:

serial0.present = "TRUE"
serial0.pipe.endPoint = "server"
serial0.fileType = "pipe"
serial0.yieldOnMsrRead = "TRUE"
serial0.startConnected = "TRUE"
serial0.tryNoRxLoss = "FALSE"
serial0.fileName = "/private/tmp/com1"

In the debugee, open an administrator command prompt and enter: bcdedit /set debug yes bcdedit /dbgsettings serial debugport:1 baudrate:115200 Run windbg x64 in the debugger Restart the debugee and pray

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment