Research Shows How Some Hardware-Gated Windows Drivers Can Be Reached Without Hardware

· Original article ↗

Summary

The analysis shows how emulated devices, spoofed hardware IDs, filter restacking and forced binding can expose some Windows PnP driver code without its intended hardware, potentially expanding BYOVD risk. Generic hardware-probe bypasses may still require kernel or hyper

Key points

  • PnP drivers often rely on AddDevice to create device objects and initialize state; simply loading a driver with sc.exe does not invoke that callback.
  • SetupAPI/PnPManager and Software Device API can create emulated device nodes with spoofed hardware IDs, prompting PnP to bind a compatible driver and call AddDevice.
  • In preliminary experiments, the author found nearly twice as many new device objects with emulated-device deployment as with simple service loading, and reports confirming driver vulnerabilities this way, including BYOVD candidates.
  • Opening a device stack requires at least one driver to handle IRP_MJ_CREATE; a bare PnPManager-owned PDO rejects it, preventing user-mode access when no other driver in the stack accepts the request.
  • The article demonstrates making filter drivers accessible by placing them above a usable disk-device stack through UpperFilters and a virtual disk, including filters intended for other device classes.
  • Forced driver binding through device registry structures can bypass normal INF matching, but using an unsuitable driver may disrupt the device or destabilize the system.
  • The author assesses that generic hardware-probe bypasses cannot be done purely from user mode and may require additional kernel-mode components or hypervisor access.

Article Details

Attack Vectors
  • An administrator can create a software-emulated device with a spoofed hardware ID and bind a driver to it, triggering PnP initialization without the original hardware.
  • A filter driver can be added to a device class's UpperFilters registry entry and loaded into an accessible device stack, potentially exposing otherwise unreachable code.
  • A driver can be bound to an existing or emulated device by modifying device and class registry structures, bypassing the normal INF-based matching process.
  • Simple service creation and startup can expose drivers that create accessible device objects directly during initialization.
Defensive Notes
  • Assess driver vulnerabilities for reachability without their intended hardware, including through emulated devices and alternative device stacks.
  • Examine forensic traces of software-emulated device creation, driver service installation, device binding changes, and UpperFilters or LowerFilters modifications.
  • Successful AddDevice invocation alone does not establish exploitability; device creation, handle access, internal state and hardware checks can still prevent access.

Products

Tools

Related Articles