Driver Vuln Analyzer
October 12, 2025 · View on GitHub
Static triage for Windows drivers: heuristically extracts & decodes IOCTLs, highlights suspicious APIs, surfaces device names, and writes a JSON report. Works as:
- IDA plugin/script (
driver_vuln_analyzer_ida.py) - (Optional) Ghidra script counterpart if you add it later
Features
- IOCTL discovery from immediates and CTL_CODE decoding (DeviceType, Function, Method, Access)
- Flags METHOD_NEITHER occurrences (pointer/buffer validation risk)
- Highlights sensitive kernel APIs (e.g.,
RtlCopyMemory,ProbeForRead/Write,MmMapIoSpace,ZwMapViewOfSection, …) - Collects device/interface strings (
\Device\...,\DosDevices\...,\??\...) - Exports consolidated JSON report
Folder structure
driver-vuln-analyzer/
├─ ida-plugin.json
├─ driver_vuln_analyzer_ida.py
└─ assets/
└─ logo.png
Requirements
- IDA 9.0+ (Python 3)
- No external Python deps required for the basic flow
Install (IDA)
-
Copy the folder to your IDA user plugins dir, e.g.
- Windows:
C:\Users\<you>\AppData\Roaming\Hex-Rays\IDA Pro\plugins\driver-vuln-analyzer\ - Linux/macOS:
~/.idapro/plugins/driver-vuln-analyzer/
- Windows:
-
Ensure
ida-plugin.jsonanddriver_vuln_analyzer_ida.pyare side by side. -
Restart IDA.
Usage (IDA)
-
Open the target .sys in IDA and let analysis finish.
-
Run via Edit → Plugins → Driver Vuln Analyzer.
-
A summary prints to the IDA output; a JSON report is written to your IDA user folder:
driver_vuln_report_<input-filename>.json
Printscreen
Hotkeys
- (Registered in menu action) Suggested:
Ctrl+Alt+9to start via menu binding. - You can also run the script directly: File → Script file… (Alt+F7).
Output
-
driver_vuln_report_<file>.jsonincludes:device_strings: discovered device/interface stringsfunctions: per-function IOCTLs, call sites, suspicious API hits, red flagsioctls_flat: unique IOCTLs with frequency and where they appearsummary: counts and METHOD_NEITHER presence
Notes & heuristics
- IOCTL enumeration is heuristic (immediate values in code). For precise control-flow mapping of dispatchers, integrate with deeper analysis (e.g., identify
IRP_MJ_DEVICE_CONTROLhandlers). - “Suspicious” APIs are hints, not proof of a vulnerability.
Roadmap (ideas)
- Lightweight dataflow for IRP buffers
- Automatic detection of
DriverObject->MajorFunctionassignments - HTML/CSV report export
- Risk scoring
Credits
Inspired by community work around Windows driver analysis and IOCTL decoding (e.g., DriverBuddy-style workflows).