Building Custom Endpoint Data Protection: Integrating Microsoft Purview with EaseFilter SDK

Start Building Your Security PoC Today

Get the full-featured 30-day trial SDK for free. Includes pre-built C# /C++/Python/Rust/Java templates to test file, process, and registry security instantly.

In today's complex data landscape, securing sensitive information across your digital estate is paramount. Microsoft Purview Information Protection (MPIP) provides a robust, cloud-native framework for data classification, labeling, and protection. However, when it comes to enforcing these policies at the granular, file-system level on Windows endpoints—especially for legacy applications or highly customized environments—developers often need more control.

This is where the EaseFilter SDK comes in. By combining the metadata and classification power of Microsoft Purview with the kernel-level file monitoring of EaseFilter, you can build next-generation endpoint data loss prevention (DLP) and security solutions.

Here is a breakdown of how you can use the EaseFilter SDK to understand, complement, and enforce Microsoft Purview Information Protection concepts.


Understanding Microsoft Purview Information Protection

Before diving into the code-level integrations, it is helpful to understand the core philosophy behind Microsoft Purview. Purview’s data protection strategy revolves around three main pillars:

  • Know Your Data: Discovering where sensitive information resides across your organization.
  • Protect Your Data: Applying sensitivity labels and encryption to files and emails.
  • Prevent Data Loss: Establishing DLP policies to stop the unauthorized sharing, copying, or exfiltration of protected data.

Microsoft Purview works exceptionally well within the Microsoft 365 ecosystem. Files are tagged with metadata (sensitivity labels) that dictate how they should be handled. But what happens when you need to strictly enforce how an unmanaged, third-party desktop application interacts with a labeled file?

Enter EaseFilter SDK: Kernel-Level Control

The EaseFilter SDK is a suite of libraries (available for C#, C++, etc.) that allows developers to interact directly with the Windows kernel via a file system filter driver. Instead of relying on user-mode hooks, EaseFilter catches File I/O operations (read, write, delete, rename) before the Windows operating system executes them.

By integrating the Microsoft Information Protection (MIP) SDK (to read Purview labels) with the EaseFilter SDK (to monitor and block file actions), developers can bridge the gap between cloud-defined policies and local endpoint enforcement.

1. Knowing Your Data: Real-Time Telemetry

To protect data, you first need to know how it is being used on the endpoint.

  • EaseFilter File Monitor Filter Driver: This component allows you to intercept every file access attempt in real time.
  • Application: You can track which processes are accessing files labeled as "Confidential" by Purview. If a suspicious, unsigned executable attempts to read a bulk number of labeled files, your EaseFilter telemetry can instantly flag this behavior for your SIEM (Security Information and Event Management) system.

2. Protecting Your Data: Enforcing Sensitivity Labels

Microsoft Purview uses sensitivity labels stored as metadata (often in alternate data streams or specific file headers) to classify data.

  • EaseFilter File Control Filter Driver: This driver allows you to define granular access control policies.
  • Application: When a user or application tries to open a file, EaseFilter intercepts the request. Your application can then use the MIP SDK to read the file's Purview sensitivity label. If the label is "Highly Confidential" and the requesting process is an unauthorized cloud sync client (like a personal Dropbox agent), EaseFilter can return an access denied command, blocking the read operation entirely.

3. Preventing Data Loss: Zero-Trust at the File System

Endpoint DLP requires stopping data exfiltration before it happens, whether it is copying a file to a USB drive or uploading it to an unsanctioned network share.

  • EaseFilter Architecture: Because EaseFilter operates at the lowest levels of the Windows file system, it cannot be easily bypassed by malware or rogue users.
  • Application: You can set up an EaseFilter rule that monitors write operations to removable media (like a USB drive). If a user attempts to copy a document, your integration can check the Microsoft Purview label. If the policy prohibits external sharing for that classification, EaseFilter instantly blocks the file creation on the USB drive and triggers a user notification.

Building the Security Pipeline

To create this unified security solution, your engineering team would build a pipeline that looks like this:

  1. Policy Sync: Your application pulls the latest Purview DLP and sensitivity label policies via Microsoft Graph or the MIP SDK.
  2. Kernel Interception: The EaseFilter driver is loaded onto the Windows endpoint, instructed to monitor specific directories or file types.
  3. Pre-Operation Callback: When a File I/O event occurs (e.g., opening or writing to a file), EaseFilter pauses the operation and sends the context to your user-mode application.
  4. Label Verification: Your application inspects the file's Purview label metadata.
  5. Enforcement: Based on the label and the Purview policy rules, your application tells EaseFilter to either allow the operation to proceed or block it with an access denied error.

Conclusion

Microsoft Purview Information Protection provides an incredible, unified framework for categorizing and securing corporate data. However, for organizations that require custom, deep-level enforcement on Windows endpoints, relying solely on native tools might leave edge cases unaddressed.

By pairing the label-reading capabilities of the Microsoft Information Protection SDK with the absolute kernel-level control of the EaseFilter SDK, developers can build robust, tailored endpoint security solutions that ensure sensitive data remains strictly governed, no matter what application tries to touch it.