串口方式
2026-05-25
Written by: tdtc
| Windows Version | Build Number | Supported Visual Studio | SDK | WDK | Comments |
|---|---|---|---|---|---|
| Windows 11 25H2 (Ge) | 26100.6584 | VS 2022 | SDK | WDK | This version is the default supported kit for Windows driver development in VS2022. |
| Windows 10 2004 (VB) | 19041.5738 | VS 2019 | SDK | WDK | Supported for Windows 7/Windows 8/Windows 8.1 driver development only. |
Instead of downloading Visual Studio, the SDK, and the WDK separately, you can download the EWDK. The EWDK is a standalone, self-contained command-line environment for building drivers. It includes Visual Studio Build Tools, the SDK, and the WDK.
vmware or vbox
\\.\pipe\com_1
i/o mode:
yield CPU on poll
Port 2:
uncheck:
Connect to existing pipe/socket
about version:
The operating system needs to match the same or higher version of windbg.
Otherwise the OS version will not be recognized!!
C:\WinDDK\7600.16385.1\Debuggers\
C:\Program Files (x86)\Windows Kits\10\Debuggers\x86
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
If you use a shortcut, you don’t need to set the download path in the command.
<home path> -y "srv*c:\symbols*https://msdl.microsoft.com/download/symbols"
Add an OS to display the OS list:
bcdedit /copy {current} /d "Sandboxie Usage"
bcdedit /debug on
bcdedit /dbgsettings serial debugport:2 baudrate:115200
Win7
After each startup, press F8 (laptop Fn+F8).
Win8+
Settings -> Update and recovery → Recovery
Troubleshoot and then Advanced options.
Go to “Advanced options” and click Start-up Settings.
Under “Start-up Settings” click Restart.
setup “SandboxieInstall32.exe”
com:
\\.\pipe\com_1
pipe checked
reconnect checked
config:
.sympath SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
details:
!sym noisy
把需要调试的pdb放入指定的文件夹。
注意每次调试新os的时候,文件夹位置会不同!!!
For example, the first time:
C:\symbols\SbieDrv.pdb\BF241AE76B2D4145B6A1B57B13335E8C1
the second time:
C:\symbols\SbieDrv.pdb\33C23FFE03A8402BA6E16961BA2880CE1
Enable Debugger Markup Language (DML) with .prefer_dml
.prefer_dml 1
load all modules:
.reload /f
Specified module:
.reload /f /i SbieDrv.sys
show specified module:
lm m SbieDrv v
Sets a breakpoint that is unresolved when the module is unloaded and re-enables when the module reloads.
bu SbieDrv!Api_CopySidStringFromUser
bu SbieDrv!Api_Init
bu SbieDrv!Api_CopyBoxNameFromUser
bu SbieDrv!Api_CopyStringToUser
bu SbieDrv!Api_GetHomePath
bu SbieDrv!Api_GetVersion
bu SbieDrv!Api_Irp_CLEANUP
bu SbieDrv!Api_LogMessage
bu SbieDrv!Api_SetFunction
bu SbieDrv!Api_SendServiceMessage
bu SbieDrv!Api_GetWork
bu SbieDrv!Api_FastIo_DEVICE_CONTROL
bu SbieDrv!Api_SetServicePort
bu SbieDrv!Api_AddWork
bu SbieDrv!Api_DelWork
bu SbieDrv!Api_Irp_CREATE
bu SbieDrv!Api_Disable
bu SbieDrv!Api_ResetServiceProcess
bu SbieDrv!Api_Unload
Activate the above debugging:
“Create a new sandbox”,
“Run web Browser”;
right click web link, “Save target as”.
List the current breakpoints to confirm that the breakpoint was set by typing the bl command.
bl
go:
g
break:
Debug -> Break
quit debug:
qd