ZeroTrust-FileAccess-Control-Example 5.8.8.1

dotnet add package ZeroTrust-FileAccess-Control-Example --version 5.8.8.1
                    
NuGet\Install-Package ZeroTrust-FileAccess-Control-Example -Version 5.8.8.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroTrust-FileAccess-Control-Example" Version="5.8.8.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroTrust-FileAccess-Control-Example" Version="5.8.8.1" />
                    
Directory.Packages.props
<PackageReference Include="ZeroTrust-FileAccess-Control-Example" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZeroTrust-FileAccess-Control-Example --version 5.8.8.1
                    
#r "nuget: ZeroTrust-FileAccess-Control-Example, 5.8.8.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZeroTrust-FileAccess-Control-Example@5.8.8.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZeroTrust-FileAccess-Control-Example&version=5.8.8.1
                    
Install as a Cake Addin
#tool nuget:?package=ZeroTrust-FileAccess-Control-Example&version=5.8.8.1
                    
Install as a Cake Tool

🛡️ zero-trust-file-security

zero-trust-file-security implements a robust zero-trust architecture for file system access. By defaulting to a strict "deny-all" policy, this framework protects sensitive directories from unauthorized viewing, modification, or ransomware attacks, requiring explicit authorization for every read, write, and execute request.

Powered by the EaseFilter File Security SDK, this project gives you kernel-level, high-performance file interception and access control.

🏗️ Architecture

The following diagram illustrates how policy rules in user mode are enforced down at the Windows Kernel level, intercepting all I/O requests before they reach the file system:

Zero-Trust Architecture

🖥️ Demo Interface

Below is an example of the zero-trust filter service dashboard, showcasing how to dynamically handle and display file-access rule exceptions for processes and users:

Zero-Trust Demo UI

✨ Core Features

  • Default Deny (Zero-Trust): All users, applications, and network requests are blacklisted by default.
  • Process-Level Whitelisting: Explicitly authorize trusted applications (e.g., notepad.exe, your-app.exe) to access specific files.
  • Granular Access Rights: Define exact permissions (Read, Write, Delete, Rename, Execute) on a per-user or per-process basis.
  • Ransomware & Malware Prevention: Untrusted processes cannot encrypt, delete, or exfiltrate protected files out of the box.
  • Real-Time Auditing: Comprehensive logging of all allowed and denied file I/O operations for compliance and security monitoring.

📄 Implement Zero trust file access control with EaseFilter

EaseFilter File Control Filter Driver allows you to control the file I/O operations with the filter rule configuration by setting the whitelist and blacklist processes or users, you can allow or block the specific file I/O operation to the specific process or user, you can control who can read your file, allow or block the file modification, prevent your important file from being deleted, renamed.

To implement the Zero Trust file access control , you can setup the filter rule with the default least privilege access rights, by default all the processes or users don’t have privilege to access the files inside this filter rule, it is zero trust to all processes and users. You can setup the whitelist for the filter rule, to add the specific access rights to specific processes or users, so the processes or users who are in the whitelist can have the specific access rights to the files.

EaseFilter Encryption Filter Driver(EEFD) allows you to encrypt file automatically and transparently, combine with the File Control Filter Driver and Process Filter Driver, you can implement the Zero Trust File Access Control with encryption enabled, it can enhance the file security. By default all files will be encrypted automatically, all processes or users can't read the encrypted files, they will get the raw encrypted data. You can authorize the processes or users to access these encrypted files.

⚙️ Installation

  1. Clone this repository to your local machine:
    git clone https://github.com/EaseFilterSDK/Zero-Trust-File-Security.git
    
  2. Open the solution in Visual Studio.
  3. Ensure the EaseFilter.FilterControl.dll is properly referenced in your project.
  4. Build the solution. Note: You will need to run the application with Administrator privileges to load the filter driver.

🚀 Getting Started

The core concept of this project is to deny all access by default and explicitly grant permissions to trusted processes.

The following example demonstrates how to protect a directory (C:\SecureData\) so that absolutely no user or program can read or modify the files—except for MySecureApp.exe.

Example: Whitelisting a Specific Process

using System;
using EaseFilter.FilterControl;

class Program
{
    static void Main(string[] args)
    {
        // 1. Initialize the Filter Control
        FilterControl filterControl = new FilterControl();

        // 2. Define the protected directory
        string protectedPath = @"C:\SecureData\*";
        FileFilter rule = new FileFilter(protectedPath);

        // 3. ZERO TRUST: Deny all file access by default
        // This blocks read, write, delete, and execution for everyone
        rule.AccessFlag = FilterAPI.ALLOW_MAX_RIGHT_ACCESS 
						& ~FilterAPI.ALLOW_FILE_READ;
						& ~FilterAPI.ALLOW_FILE_WRITE;
						& ~FilterAPI.ALLOW_FILE_DELETE;						
        	
		// 4. WHITELIST: Grant full access ONLY to 'MySecureApp.exe'
		// EXPLICIT AUTHORIZATION WITH CRYPTOGRAPHIC VERIFICATION
		// Trust based on Digital Certificate (Best for commercial software)
		// If a rogue MySecureApp.exe tries to access the files but isn't signed 
		// by the real 'EaseFilter Technologies', it will be blocked instantly.
		rule.AddTrustedProcessRight(
			(uint)FilterAPI.ALLOW_MAX_ACCESS_RIGHT, 
			"MySecureApp.exe", 
			"EaseFilter Technologies", // Certificate Subject Name
			""                       // Hash (omitted)
		);

        // 5. Add the rule and start the engine
        filterControl.AddFilter(rule);
        
        try
        {
            filterControl.StartFilter();
            Console.WriteLine("Zero-Trust File Security is active.");
            Console.WriteLine("Try opening files in C:\\SecureData\\ with anything other than MySecureApp!");
            Console.ReadLine();
        }
        catch (Exception ex)
        {
            Console.WriteLine("Failed to start filter: " + ex.Message);
        }
        finally
        {
            // Ensure the filter stops securely when the app closes
            filterControl.StopFilter();
        }
    }
}

EaseFilter File System Filter Driver SDK Reference

Product Name Description
Cloud File System SDK EaseFilter Cloud File System SDK Introduction.
CloudTier Storage Tiering SDK EaseFilter Storage Tiering Filter Driver SDK Introduction.
File Monitor SDK EaseFilter File Monitor Filter Driver SDK Introduction.
File Control SDK EaseFilter File Control Filter Driver SDK Introduction.
File Encryption SDK EaseFilter Transparent File Encryption Filter Driver SDK Introduction.
Registry Filter SDK EaseFilter Registry Filter Driver SDK Introduction.
Process Filter SDK EaseFilter Process Filter Driver SDK Introduction.
EaseFilter SDK Programming EaseFilter Filter Driver SDK Programming.

EaseFilter SDK Sample Projects

Sample Project Description
CloudTier Storage Tiering Demo A HSM File System Filter Driver Demo.
CloudTier S3 Tiering Demo CloudTier S3 Intelligent Tiering Demo.
Cloud File DR S3 Demo Cloud File DR S3 Demo.
Amazon S3 File Explorer Demo Amazon S3 File Explorer Demo.
Auto File DRM Encryption Auto file encryption with DRM data embedded.
Transparent File Encrypt Transparent on access file encryption.
Secure File Sharing with DRM Secure encrypted file sharing with digital rights management.
File Monitor Example Monitor file system I/O in real time, tracking file changes.
File Protector Example Prevent sensitive files from being accessed by unauthorized users or processes.
FolderLocker Example Lock file automatically in a FolderLocker.
Process Monitor Monitor the process creation and termination, block unauthorized process running.
Registry Monitor Monitor the Registry activities, block the modification of the Registry keys.
Secure Sandbox Example A secure sandbox example, block the processes accessing the files out of the box.
FileSystemWatcher Example File system watcher, logging the file I/O events.
ZeroTrust Example Zero trust file access control with encryption feature.

Filter Driver Reference

Support

If you have questions or need help, please contact support@easefilter.com

License

This repository contains two distinct licensing categories:

  1. Wrapper/Implementation Code (MIT License): The source code, scripts, and configuration files provided directly in this repository are licensed under the MIT License. You are free to modify, distribute, and use this specific integration code.

  2. EaseFilter SDK (Commercial License): This project requires the EaseFilter SDK (including its binaries, filter drivers, and core libraries) to function. The EaseFilter SDK is proprietary commercial software and is strictly excluded from the MIT License.

    To use the EaseFilter SDK for commercial purposes or in a production environment, you must obtain a valid commercial license directly from EaseFilter.

Home | Solution | Download | Demos | Blog | Programming

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.8.8.1 40 11/23/2026
5.5.1.1 293 2/22/2025

Default Deny (Zero-Trust): All users, applications, and network requests are blacklisted by default.
Process-Level Whitelisting: Explicitly authorize trusted applications (e.g., notepad.exe, your-app.exe) to access specific files.
Granular Access Rights: Define exact permissions (Read, Write, Delete, Rename, Execute) on a per-user or per-process basis.
Ransomware & Malware Prevention: Untrusted processes cannot encrypt, delete, or exfiltrate protected files out of the box.
Real-Time Auditing: Comprehensive logging of all allowed and denied file I/O operations for compliance and security monitoring.