This project provides you the core foundation to build a fully executable Windows kernel driver in C#. The primary backbone technologies of this project are NativeAOT and .NET 7.
The requirements are as follows:
- .NET 7
- Visual Studio 2022 Latest
- Windows 10 SDK, version 2004 (10.0.19041.0)
- Windows Driver Kit (WDK)
As of now, the project is set up to require few steps in order to have the driver build successfully. The steps are as follows:
- When you first open up the project solution, configure the build configuration to targets release mode rather than debug.
- Build the WDK.NET project (Assuming it is in release build mode).
- Publish the Sampleriver in Win-x64 and in Release profile.
- Currently, the ILC(NativeAOT compiler) will complain that it fails to produce a native executable for linking and the publish will result in a fail. Just simply disregard that error. You will nonetheless see a driver executable file (.sys) in the publish path.
There are multiple ways you can test the driver in action.
- A Windows virtual machine with test sign mode on (Most safe and the officially supported method of testing)
- Kdmapper and a WinDbg or DbgView in a Windows virtual machine (Hacky and unreliable/unsafe, yet easier to do get-go testing)
- Whichever driver testing method you like
- Further port the WDK
- Instead of having the WDK referenced as a local DLL, properly resolve it as a project dependency (There are some compile issues with this currently)
- Etc. Please suggest via PR
Currently there is no-limited documentation present. If you will, you are more than welcomed to contribute in writing the documentation.
You can contribute by creating issues if any, or suggest a fix or feature addition via PRs. When contributing by code, please follow the C# Coding Convention to keep the code organised.