EaseFilter File System Monitor Filter SDK: Installation, Examples, and Best Practices
Overview
EaseFilter File System Monitor Filter SDK is a Windows file-system filter driver SDK for monitoring, auditing, and controlling file operations in real time. It’s commonly used for file auditing, data loss prevention, encryption hooks, and access control at the kernel level.
System requirements
- Windows 10 / 11 or Windows Server 2016 and later (64-bit).
- Visual Studio (recommended) with Windows Driver Kit (WDK) matching target OS.
- Administrator privileges for driver installation and testing.
- Development machine with test-signing enabled or properly signed driver for production.
Installation (developer setup)
- Install prerequisites
- Install Visual Studio (Community/Professional).
- Install Windows Driver Kit (WDK) matching your Visual Studio version.
- Obtain the SDK
- Download the EaseFilter SDK package from the vendor (zip or installer).
- Unpack and open project
- Extract SDK files to a workspace.
- Open sample solution in Visual Studio (ensure correct platform x64).
- Configure driver signing
- For development: enable test-signing on the machine (
bcdedit /set testsigning on) and reboot. - For production: sign driver with a code-signing certificate trusted by target systems.
- For development: enable test-signing on the machine (
- Build and deploy
- Build kernel and user-mode components in Release/x64.
- Use provided installer or sc create + sc start to register the service/driver.
- Verify driver loaded (Device Manager or
sc query).
Quick example: Basic file monitoring (C# user-mode sample)
- Load the provided managed wrapper (EaseFilter.dll).
- Register callback to receive file event notifications (create, read, write, delete).
- Example flow:
- Initialize filter manager and apply monitoring rules (paths, process filters).
- Subscribe to OnPreOperation or OnPostOperation events.
- Log events to a rotating file or database.
Pseudocode (conceptual):
csharp
// initializevar manager = new FilterManager();manager.AddMonitorPath(@“C:\ImportantData”);manager.OnFileOperation += (sender, evt) => { // evt.Type: Create/Read/Write/Delete Log($“{evt.Time}: {evt.ProcessName} {evt.Type} {evt.FilePath}”);};manager.Start();
Example: Block unauthorized delete
- Define rule to deny Delete for specific folder unless process is whitelisted.
- In pre-operation callback, check operation type and process identity; return deny for unauthorized attempts.
- Ensure to return appropriate NTSTATUS error codes and avoid long blocking operations in callbacks.
Best practices
- Minimize work in kernel callbacks: Do minimal validation and defer heavy processing to user-mode via fast queues or completion ports.
- Use robust whitelisting/blacklisting: Match by process image path and digital signature where possible to reduce false positives.
- Graceful error handling: Return correct NTSTATUS codes; ensure consistent behavior to avoid data corruption.
- Logging strategy: Log asynchronously and rotate logs to avoid disk saturation. Include timestamps, process ID, and hashes if needed.
- Testing: Test under heavy load and with non-privileged accounts; validate behavior on supported OS versions.
- Driver signing & deployment: Always sign drivers for production and follow Microsoft requirements for kernel drivers.
- Security: Run least-privilege user-mode components and validate all inputs from the kernel.
- Performance tuning: Limit monitored paths or use selective filters to reduce overhead; measure latency impact.
- Compatibility: Test with antivirus and backup solutions to detect conflicts with other file system filter drivers.
Troubleshooting tips
- Driver not loading: check test-signing, signature, and event viewer for driver error codes.
- Missing events: verify filter rules and path normalization; ensure correct privilege context.
- Performance regression: profile callbacks and move heavy tasks to user-mode workers.
- Conflicts with other filters: use filter manager ordering and test interactions with common AV drivers.
Security and deployment checklist
- Sign driver for production.
- Harden
Leave a Reply