| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Windows USB protocol analyzer that captures and decodes USB traffic at the kernel level. USBTrace consists of a kernel-mode capture driver, a GUI application for real-time capture and analysis, and a set of decoder plug-ins for major USB device classes.
| Decoder | Class |
|---|---|
| HIDDecoder | Human Interface Device (HID) |
| HubDecoder | USB Hub |
| MSDDecoder | Mass Storage (Bulk-Only & CBI) |
| AudDecoder | Audio |
| CDCDecoder | Communications Device Class (CDC) |
| CCIDDecoder | Chip/Smart Card (CCID) |
| VidDecoder | Video |
| SICDecoder | Smart Card Interface Class |
| PHDCDecoder | Personal Healthcare Device Class |
| PrinterDecoder | Printer |
| TMCDecoder | Test & Measurement Class (USBTMC) |
| WCDecoder | Wireless / Bluetooth (BTDecoder + HWADecoder) |
| VendorDecoder | Vendor-specific fallback |
┌──────────────────────────────┐
│ USBTrace.exe (GUI) │ MFC Document/View application
│ CMainFrame / CUSBTraceDoc │
└────────────┬─────────────────┘
│ IOCTL
┌────────────▼─────────────────┐
│ utdrv.sys (kernel driver) │ Kernel mode hook driver to intercept USB traffic
└──────────────────────────────┘
│ per-packet data
┌────────────▼─────────────────┐
│ Decoder DLLs (plug-ins) │ One DLL per USB device class
└──────────────────────────────┘
utdrv.sys is not a WDM filter driver attached to the USB device stack — DriverEntry (utdrv/Init.c) creates a plain control device (\Device\utdrv) for IOCTL communication and never calls IoAttachDeviceToDeviceStack/AddDevice. Instead, capture works by patching the Import Address Table (IAT) of the relevant driver images directly in kernel memory:
The GUI reads raw USB packets captured this way and passes them to the appropriate decoder DLL based on the USB class of the device. Decoded results are displayed in a list view with expandable detail panes.
Open USBTrace\USBTrace.sln in Visual Studio 2012. The solution contains the main application and all decoder DLL projects.
Win32 Release:
msbuild USBTrace\USBTrace.sln /p:Configuration=Release /p:Platform=Win32
x64 Release:
msbuild USBTrace\USBTrace.sln /p:Configuration=Release /p:Platform=x64
Kernel driver (utdrv) must be built separately using the DDK build environment:
cd utdrv build -cZ
Or open a WDK build command prompt and run build in the utdrv directory for the target architecture.
USBTrace/ Main GUI application (MFC) utdrv/ Kernel-mode IAT-patch helper driver (WDM/WDK) HIDDecoder/ HID class decoder DLL HubDecoder/ Hub class decoder DLL MSDDecoder/ Mass Storage decoder DLL AudDecoder/ Audio class decoder DLL CDCDecoder/ CDC decoder DLL CCIDDecoder/ CCID decoder DLL VidDecoder/ Video decoder DLL SICDecoder/ Smart Card Interface decoder DLL PHDCDecoder/ PHDC decoder DLL PrinterDecoder/ Printer class decoder DLL TMCDecoder/ USBTMC decoder DLL WCDecoder/ Wireless/BT decoder DLL (contains BTDecoder and HWADecoder) VendorDecoder/ Vendor-specific fallback decoder DLL
The following third-party code is included in the USBTrace/ source tree:
| Component | Author | License |
|---|---|---|
| HLinkCtrl/ — Hyperlink control | PJ Naughter | Permissive (attribution required) |
| CPPToolTip/ — Tooltip with HTML rendering | Eugene Pustovoyt | Free for OSS/freeware use |
| Graph/2DPushGraph.* — Push graph control | Stuart Konen | No explicit license |
| HexEdit/ — Hex editor control | Various | See individual file headers |
| smtp/ — SMTP client | PJ Naughter | See file header |
| inc/usb.ids.txt — USB vendor/device ID database | Linux USB Project | GPL |
This project is released under the GNU General Public License v2 (or later). See LICENSE for details.
The USB ID database (USBTrace/inc/usb.ids.txt) is from the Linux USB project and is also GPL-licensed.
| Back | FazBrowse Home | New Git URL |