A common misconception in the driver-signing world is that boot-start drivers must have a signature embedded in the driver binary itself. This is not strictly true, although it’s still the right thing to do.
To re-cap, x64 systems check every kernel-mode binary on load for a digital signature. The signature can be an Authenticode signature or a Microsoft-supplied signature, as I discussed in my last post.
There are actually two ways that the OS can tell if a driver is signed:
- The driver binary can be signed, as a resource embedded right in the PE file
- The driver’s .cat file can be signed
The boot loader can, in fact, handle either type of signature, but for important performance reasons, signing the binary itself is the recommended practice. Peter Brundrett from Microsoft was kind enough to provide this explanation:
The loader does have code to find .cat files for boot start drivers. However, the loader depends on a simple I/O subsystem that is not very high performance. If a boot start driver is catalog signed, the loader has to locate (seek and read) through potentially hundreds of small catalog files to find the catalog that signed the particular boot start driver. There is mechanism in code integrity in the loader to be smarter about how it locates the catalog that did sign the boot start driver on the next boot. But using embedded signatures is much better, and over time as more update catalogs are installed, makes for more consistently faster boot times that do not have catalog dependencies.
So, again, the best practice is simply to sign every binary you produce. It’s easy to integrate into the build system and will keep you from having to ever think about this stuff again.