DeepZero icon indicating copy to clipboard operation
DeepZero copied to clipboard

Record whether a driver exposes its device without hardware present

Open 416rehman opened this issue 4 months ago • 1 comments

Motivation

A finding is only actionable if the IOCTL handler can be reached. Many drivers create their device object only after their hardware is enumerated, so on a machine or VM without that hardware the device never appears and the reported attack surface cannot be exercised at all.

Verifying a flagged driver on a test system currently means loading it and discovering this by hand: the driver loads and runs, \.\<name> does not open, and there is no way to tell from the report whether that means "not vulnerable" or "not reachable here".

Proposal

The decompilation stage already extracts the device name and symbolic link. It can also record how the device is created - whether IoCreateDevice/IoCreateSymbolicLink is reached directly from DriverEntry, or only from a PnP add-device or start-device path.

Surfacing that lets the report separate "reachable on any machine" from "needs the hardware", which is the difference between a finding someone can confirm today and one that needs the physical device.

Acceptance criteria

  • [ ] The decompilation stage records how the device object is created and whether it is unconditional from DriverEntry.
  • [ ] The value appears in the report so drivers that can be exercised anywhere can be worked first.
  • [ ] Documented in the pipeline reference alongside the existing device fields.

416rehman avatar Jul 25 '26 07:07 416rehman

Flagging a scoping concern before this gets built.

The first criterion is squarely a driver concern and belongs in processors/ghidra_decompile — IoCreateDevice, DriverEntry, PnP start paths. That part is fine: processors are where domain knowledge lives, and this one is already a kernel-driver processor.

The second is the one to be careful with. engine/report.py is pipeline-agnostic by design — its own docstring commits to a kernel-driver pipeline, a source-code bug hunt over GitHub repositories and anything else rendering without changing the module. Teaching it what a device object is would break that, and the next pipeline would want its own equivalent.

It does not need to. A processor already declares the values it records via provides, and a pipeline already chooses which of them the report surfaces via report.columns in its yaml. So this criterion is satisfied by:

  • ghidra_decompile recording something like device_created_from / device_unconditional, added to its provides
  • pipelines/loldrivers/pipeline.yaml listing that key under report.columns

which puts it in the report with no engine change at all. Worth writing the criterion that way so the implementation does not reach for a special case.

Related: the review-mark primitive added in #24 covers the reporting half of the underlying need generically — a reachability caveat is exactly the kind of thing that gets marked outstanding on a result. This issue then only has to supply the evidence for that judgement, not a bespoke way to display it.

416rehman avatar Jul 27 '26 00:07 416rehman