{"id":29433746,"url":"https://github.com/mytechnotalent/windows-kernel-debugging","last_synced_at":"2025-07-13T01:14:24.795Z","repository":{"id":302653591,"uuid":"1013184072","full_name":"mytechnotalent/windows-kernel-debugging","owner":"mytechnotalent","description":"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.","archived":false,"fork":false,"pushed_at":"2025-07-12T15:03:03.000Z","size":1008,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T17:29:13.772Z","etag":null,"topics":["windows","windows-10","windows-11","windows-kernel","windows-kernel-development","windows-kernel-exploitation","windows-kernel-hook"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mytechnotalent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-03T13:40:09.000Z","updated_at":"2025-07-12T15:03:06.000Z","dependencies_parsed_at":"2025-07-03T18:32:12.828Z","dependency_job_id":null,"html_url":"https://github.com/mytechnotalent/windows-kernel-debugging","commit_stats":null,"previous_names":["mytechnotalent/windows-kernel-debugging"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mytechnotalent/windows-kernel-debugging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2Fwindows-kernel-debugging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2Fwindows-kernel-debugging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2Fwindows-kernel-debugging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2Fwindows-kernel-debugging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mytechnotalent","download_url":"https://codeload.github.com/mytechnotalent/windows-kernel-debugging/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mytechnotalent%2Fwindows-kernel-debugging/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265077554,"owners_count":23707707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["windows","windows-10","windows-11","windows-kernel","windows-kernel-development","windows-kernel-exploitation","windows-kernel-hook"],"created_at":"2025-07-13T01:14:24.315Z","updated_at":"2025-07-13T01:14:24.783Z","avatar_url":"https://github.com/mytechnotalent.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/mytechnotalent/windows-kernel-debugging/blob/main/Windows-Kernel-Debugging.png?raw=true\"\u003e\n\n## FREE Reverse Engineering Self-Study Course [HERE](https://github.com/mytechnotalent/Reverse-Engineering-Tutorial)\n\n\u003cbr\u003e\n\n# Windows Kernel Debugging\nA 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.\n\n---\n\n## 🧰 Environment Overview\n\n### Host Machine\n- Windows OS (any version)\n- WinDbg Preview (from Microsoft Store)\n- VMware Workstation\n\n### Guest VM\n- Windows 10 x64\n- Configured for COM-based kernel debugging via named pipe\n\n---\n\n## ⚙️ Configure the Guest VM\n\n1. **Shut down the VM**\n2. **Add Serial Port in VMware**:\n   - VM Settings → Add → Serial Port\n   - Output to named pipe\n   - Pipe name: `\\\\.\\pipe\\com1`\n   - This end is the server ✅\n   - The other end is an application ✅\n\n3. **Enable Kernel Debugging in Guest OS**:\n   Open Command Prompt as Administrator inside the VM and run:\n   - `bcdedit /debug on`\n   - `bcdedit /dbgsettings serial debugport:1 baudrate:115200`\n\n4. **Reboot the VM**\n\n---\n\n## 🧠 Launch WinDbg on Host\n\n1. Run WinDbg as Administrator (on the host machine)\n2. Go to `File → Kernel Debug → COM`\n3. Set the following:\n   - Port: `\\\\.\\pipe\\com1`\n   - Baud: `115200`\n   - Pipe: ✅\n   - Reconnect: ✅\n   - Break on Connection: optional\n   - Resets: `0`\n\nClick **OK**. WinDbg will say:\n`Waiting to reconnect...`\n\n---\n\n## 🚦 Establish the Debug Connection\n\n1. Reboot the guest VM.\n2. WinDbg on the host should automatically connect:\n- `Connected to target Windows 10...`\n- `Kernel Debugger connection established.`\n3. Load symbols:\n- `.reload /f`\n\n---\n\n## 🎯 Trace Process Creation\n\n1. Set a breakpoint on process creation:\n- `bp nt!PspCreateProcess`\n- `g` to continue\n\n2. Inside the VM, launch a user-mode process (e.g. `notepad.exe`)\n\n3. WinDbg will pause in `PspCreateProcess` — the kernel is actively creating a new `EPROCESS`.\n\n---\n\n## 🔍 Inspect Process Internals\n\n- Dump the current process:\n- `!process 0 0`\n- Check image name:\n- `dx ((nt!_EPROCESS*) @rcx)-\u003eImageFileName`\n- View call stack:\n- `k`\n- View command line:\n- Inspect `RSP` → extract `_RTL_USER_PROCESS_PARAMETERS`\n\n---\n\n## 🧪 Troubleshooting Tips\n\n- **WinDbg won’t connect**:\n- Ensure VM pipe and debugger port match (`\\\\.\\pipe\\com1`)\n- Verify bcdedit settings inside the guest\n- Reboot VM with WinDbg already listening\n\n- **VM hangs on boot**:\n- Kernel is paused — type `g` in WinDbg to continue\n\n- **Symbols don’t resolve**:\n- Use `.symfix` followed by `.reload /f`\n\n---\n\n## 🧠 Extras\n\n- Add breakpoints to `PspCreateThread`, `NtCreateUserProcess`\n- Use `!handle`, `!token`, or `!object` for kernel object insight\n- Explore `EPROCESS.ActiveProcessLinks` for the full process list\n\n---\n\n\u003cbr\u003e\n\n## License\n[MIT](https://github.com/mytechnotalent/windows-kernel-debugging/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmytechnotalent%2Fwindows-kernel-debugging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmytechnotalent%2Fwindows-kernel-debugging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmytechnotalent%2Fwindows-kernel-debugging/lists"}