Summary
This is the first blog in a series diving into Windows driver internals. This post will show how to write a simple driver to facilitate our research purposes, and how you can build it without having to use Visual Studio.
I released a PowerShell script and sample project for building and signing basic drivers for further research purposes. You can download the project here.
Pre-requisites
I did this with:
- Windows 11 24H2 (OS Build 26100.4652)
- Visual Studio 2022 (17.14.9)
- Windows SDK (26100.4654)
- Windows Driver Kit (WDK; 10.0.26100.2452)
Normal Driver Build Flow
To figure out how to build a driver without Visual Studio, I first needed to figure out all of the steps Visual Studio was doing. I created a Kernel Mode Driver (KMDF) sample project in Visual Studio, then recorded all new processes with Procmon when building the solution. The process tree looks something like this: