ScamAlert's real monitor is a kernel-mode Windows Filtering Platform callout driver. Build it on the host with the WDK + Visual Studio. Run and test it inside a Windows 11 VM with test-signing enabled.
- Visual Studio 2022 or 2026 with the "Desktop development with C++" workload. This box already has VS Community 2026 installed.
- Windows 11 SDK 10.0.28000.x - already installed on this box. (10.0.26100.x also works.)
- Windows Driver Kit - install via Visual Studio Installer ->
Modify -> Individual components -> "Windows Driver Kit". This
delivers the
Microsoft.Windows.DriverKitVSIX (project templates + MSBuild targets). Kernel headers and libraries (ntddk.h,fwpsk.h,fwpkclnt.lib) are pulled from theMicrosoft.Windows.WDK.x64NuGet package referenced from the driver.vcxprojat build time, not from a globalWindows Kits\10install. The legacywdksetup.exestandalone installer also works but is no longer required. - Visual Studio C++ Spectre-mitigated libraries (latest) - add via Visual Studio Installer "Modify" -> "Individual components". WDK templates require these to link.
- Administrator PowerShell for the install scripts.
- Windows 11 installed from an evaluation ISO through
create-dev-vm.ps1, as described in dev environment setup. - Test-signing enabled:
bcdedit /set testsigning on. - Secure Boot turned off (set on the Hyper-V VM via
Set-VMFirmware -EnableSecureBoot Off). - PowerShell remoting (
Enable-PSRemoting -Force) so the host can drive the VM viaInvoke-Command -VMName. - Stable computer name (we use
ScamAlertDev). - The WDK is not required in the VM unless you intentionally build the
native driver inside the VM. The normal workflow builds on the host
and deploys the
.systo the VM.
Do not enable test-signing on the host - it is a VM-only posture.
Run on the host:
scripts/driver/check-driver-prereqs.ps1Expected after WDK install (modern path):
VsWdkExtensionPresentisTrue.VsWdkExtensionVersionreports a 10.0.x version (e.g.10.0.26586.0).NuGetWdkPackagesmay say<none yet - will populate on first build>before the first driver build, and resolve tomicrosoft.windows.wdk.x64etc. afterward.VisualStudioreports the installed VS edition.
Or after WDK install (legacy path - only if you also ran
wdksetup.exe):
LegacyWdkPresentisTrueandNtddkHeader,FwpskHeader,FwpkclntLibraryresolve to real paths under...\Include\10.0.x\kmand...\Lib\10.0.x\km\x64.
Either path is acceptable. The driver .vcxproj will use the NuGet
package even when the legacy path is also present.
Run on the host after the VM has been created, finalized, and configured:
scripts/driver/verify-vm-access.ps1Expected:
- test signing is enabled in the VM.
- Secure Boot is off for the VM.
- PowerShell Direct/remoting can reach the VM.
- the VM network profile is usable for the scripted traffic tests.
If you choose to build the driver inside the VM, install the same host tooling there and then run:
scripts/driver/check-driver-prereqs.ps1 -CheckTestSigningThe recommended path is via the Visual Studio Installer. Open
Visual Studio Installer -> Modify your VS edition ->
"Individual components" tab -> check "Windows Driver Kit" ->
Modify. This installs the project templates and MSBuild targets.
Kernel headers and libraries are pulled per-project at build time
from the Microsoft.Windows.WDK.x64 NuGet package, so no separate
installer is needed.
The legacy standalone installer is still published at
https://learn.microsoft.com/windows-hardware/drivers/download-the-wdk
if you prefer global headers/libs under
C:\Program Files (x86)\Windows Kits\10\Include\<ver>\km. Match the
WDK version to the installed SDK if you take this route.
Open Visual Studio Installer -> Modify the installed VS edition ->
"Individual components" tab -> ensure these are checked:
MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (latest)Windows 11 SDK (10.0.26100.0)(already installed - just verify)
The first item is the one that breaks WDK template links if missing.
Visual Studio Community 2026 was released recently. The WDK Visual
Studio extension historically targets a specific VS major version. If
the WDK templates do not appear in File > New > Project after
installing the WDK, install the standalone WDK.vsix from the same
Microsoft download page and verify that "Empty WDM Driver" appears
under C++.
Run inside the VM as administrator:
bcdedit /set testsigning on
Restart-ComputerAfter the reboot the VM desktop should show Test Mode watermark in
the lower-right corner. Reverting:
bcdedit /set testsigning off
Restart-ComputerSee dev-environment-setup.md for the
full Hyper-V VM bring-up runbook.