The inline-prevention layer for BruceEDR. It denies opens of sensitive paths while blocking is enabled, driven by policy pushed from the user-mode agent over a filter communication port.
- Install Visual Studio + the Windows Driver Kit (WDK) matching your VS version.
- Create a "Kernel Mode Driver, Empty (KMDF/WDM)" or "Filter Driver: Filesystem
Mini-Filter" project and add
BruceFilter.c,BruceFilter.h,BruceFilter.inf. - Configuration: x64 / Release. Build → produces
BruceFilter.sys.
Production Windows will not load an unsigned kernel driver. In an isolated VM:
bcdedit /set testsigning on & reboot
inf2cat /driver:. /os:10_X64 (generate the .cat)
Sign with a test certificate (makecert/signtool), then install + start:
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 128 .\BruceFilter.inf
fltmc load BruceFilter
fltmc (confirm it is running)
The agent's MinifilterClient connects to \BruceFilterPort and pushes policy.
To load on normal machines the .sys must be signed via attestation signing or
an EV code-signing certificate + WHQL/HLK submission through the Microsoft
Partner Center. A unique altitude must also be requested from Microsoft (the
385201 here is a placeholder). This is an external process, not something the code
can satisfy on its own.
- Push a trusted-PID allowlist from user mode and check
FltGetRequestorProcessId(Data)before denying. - Switch from outright deny to send-event-and-wait:
FltSendMessagethe create attempt to the agent and complete based on its verdict. - Add contexts/streams and handle
IRP_MJ_SET_INFORMATION(renames) and writes.