FREE Reverse Engineering Self-Study Course HERE
A guide to get you started with Windows Kernel Debugging walking you through the complete setup and usage of WinDbg to trace Windows process creation at the kernel level, from boot to PspCreateProcess, using VMware Workstation.
- Windows OS (any version)
- WinDbg Preview (from Microsoft Store)
- VMware Workstation
- Windows 10 x64
- Configured for COM-based kernel debugging via named pipe
-
Shut down the VM
-
Add Serial Port in VMware:
- VM Settings → Add → Serial Port
- Output to named pipe
- Pipe name:
\\.\pipe\com1
- This end is the server ✅
- The other end is an application ✅
-
Enable Kernel Debugging in Guest OS: Open Command Prompt as Administrator inside the VM and run:
bcdedit /debug on
bcdedit /dbgsettings serial debugport:1 baudrate:115200
-
Reboot the VM
- Run WinDbg as Administrator (on the host machine)
- Go to
File → Kernel Debug → COM
- Set the following:
- Port:
\\.\pipe\com1
- Baud:
115200
- Pipe: ✅
- Reconnect: ✅
- Break on Connection: optional
- Resets:
0
- Port:
Click OK. WinDbg will say:
Waiting to reconnect...
- Reboot the guest VM.
- WinDbg on the host should automatically connect:
Connected to target Windows 10...
Kernel Debugger connection established.
- Load symbols:
.reload /f
- Set a breakpoint on process creation:
bp nt!PspCreateProcess
g
to continue
-
Inside the VM, launch a user-mode process (e.g.
notepad.exe
) -
WinDbg will pause in
PspCreateProcess
— the kernel is actively creating a newEPROCESS
.
- Dump the current process:
!process 0 0
- Check image name:
dx ((nt!_EPROCESS*) @rcx)->ImageFileName
- View call stack:
k
- View command line:
- Inspect
RSP
→ extract_RTL_USER_PROCESS_PARAMETERS
-
WinDbg won’t connect:
-
Ensure VM pipe and debugger port match (
\\.\pipe\com1
) -
Verify bcdedit settings inside the guest
-
Reboot VM with WinDbg already listening
-
VM hangs on boot:
-
Kernel is paused — type
g
in WinDbg to continue -
Symbols don’t resolve:
-
Use
.symfix
followed by.reload /f
- Add breakpoints to
PspCreateThread
,NtCreateUserProcess
- Use
!handle
,!token
, or!object
for kernel object insight - Explore
EPROCESS.ActiveProcessLinks
for the full process list