Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:Windows driver INF

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

The INF setup file of a Windows driver package (.inf, INI-like text, often UTF-16 with BOM): the [Version] keys, the install-section layout, and the KMDF and service sections that tell a reverser which service, load group and framework version a .sys expects.

A driver package is a .inf text file, the driver binaries (.sys) and a security catalog (.cat) that the INF names. The INF is INI-like: [Section] headers, key = value lines, ; comments, %Name% references into a [Strings] section and %12%/%13% numeric directory ids (DIRIDs). Unverified: that real packages are often UTF-16 LE with BOM (the samples read were ASCII text); check the first bytes FF FE.

[Version] section

Keys seen in the Microsoft samples (nullFilter.inf, echo.inx):

  • Signature = "$Windows NT$" (also written "$WINDOWS NT$").
  • Class and ClassGuid: the device setup class, for example ActivityMonitor with {b86dff51-a31e-4bac-b3cf-e8cfe75c9fc2} for a file system minifilter, Sample with a sample GUID for the echo driver.
  • Provider = %ProviderString%.
  • DriverVer = mm/dd/yyyy,a.b.c.d.
  • CatalogFile = name.cat: the catalog file that signs the package (see below).
  • PnpLockdown = 1: the driver files are not modified after install; the samples note that driver-store DIRIDs need Windows 10 1709.

Install sections

[SourceDisksFiles] and [SourceDisksNames] name the files; [DestinationDirs] maps copy sections to DIRIDs (12 = %windir%\system32\drivers, 13 = driver store, per the comments in nullFilter.inf). A [Manufacturer] line %Mfg%=Standard,NT$ARCH$.10.0...16299 lists decorated model sections (target architecture and minimum OS build); $ARCH$ and $KMDFVERSION$ in .inx files are replaced by the build. A model line %Desc%=Install_Section, root\ECHO gives the hardware id. AddService = Name, 0x2, Service_Inst (0x2 is SPSVCINST_ASSOCSERVICE) has a service section with ServiceType (1 kernel driver, 2 file system driver), StartType (3 demand start), ErrorControl (1), ServiceBinary (%13%\name.sys), LoadOrderGroup and Dependencies. Minifilters add altitude values: Platform:Windows/Minifilter drivers.

KMDF binding

A KMDF driver's INF has a [Install.NT.Wdf] section with KmdfService = ECHO, ECHO_wdfsect and the referenced section sets KmdfLibraryVersion = 1.xx (in the sample the build tool substitutes $KMDFVERSION$). This is the version the driver's WdfVersionBind call requests: Platform:Windows/Kernel drivers#KMDF (WDF) drivers.

Fact: Fact:Windows driver INF/identification/KMDF version in INF.

Catalog file (.cat)

Unverified (not read in a source): the .cat is a PKCS#7 signed-data structure whose signed content is a list of file hashes; it starts with the DER byte 30 82 and can be inspected with a generic PKCS#7 parser. A signed driver .sys may instead embed its signature in the PE certificate table; the PE flag IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY (0x0080, Fact:PE (Portable Executable)/enum/DllCharacteristics) asks the loader to check it. Unverified: how the kernel handles each case.

Code & repositories

  • https://github.com/microsoft/Windows-driver-samples @ 2dc3fd3a0cc84a2933f2194e7ec0871584979071 · license: MS-PL
    Microsoft driver samples (MS-PL): filesys/miniFilter/nullFilter (.c, .inf) and general/echo/kmdf/driver/AutoSync/echo.inx
    Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-14