A proof-of-concept Data Loss Prevention (DLP) platform that detects, monitors, and prevents sensitive data from leaving an organization through endpoints, network channels, and data at rest.
Shares kernel driver infrastructure with AkesoEDR.
Data Loss Prevention (DLP) is a category of security tools that identify, monitor, and protect sensitive data β credit card numbers, social security numbers, intellectual property, medical records, source code β and enforce policies that control how that data moves across endpoints, networks, and storage.
Organizations generate and handle sensitive data constantly. Without DLP, that data flows freely β copied to USB drives, emailed to personal accounts, uploaded to cloud storage, pasted into chat applications. A single uncontrolled transfer can mean regulatory fines, intellectual property theft, or breach notification obligations.
-
Content inspection. DLP looks inside files and messages, not just at metadata. It uses regex patterns, keyword dictionaries, data identifiers with validation algorithms (Luhn for credit cards, MOD-97 for IBANs), file type detection by binary signature, and document fingerprinting to classify content.
-
Policy enforcement. Detection alone isn't enough. DLP enforces response actions β block the transfer, notify the user, require justification, quarantine the file β based on configurable policies with severity tiers and exception logic.
-
Prevention, not just detection. A minifilter driver intercepts file system operations before they complete. When a user copies a file containing 50 credit card numbers to a USB drive, the write is blocked before bytes reach the device. This is the same approach enterprise DLP vendors use in production.
-
Visibility across channels. Sensitive data leaves through many paths β USB drives, network shares, clipboard, browser uploads, email, printing. DLP monitors all of them with channel-specific interception mechanisms.
| Role | How They Use DLP |
|---|---|
| Security Analyst | Triages policy violations, investigates incidents, determines intent vs. accidental exposure |
| Compliance Officer | Ensures regulatory requirements (PCI-DSS, HIPAA, GDPR, SOX) are enforced across data handling |
| IT Administrator | Manages agent deployment, policy distribution, endpoint health monitoring |
| Incident Responder | Reviews matched content, traces data movement, coordinates remediation |
| CISO / Risk Manager | Uses reporting and risk scoring to understand organizational data exposure |
Understanding how DLP works at the implementation level β minifilter drivers, content inspection pipelines, policy evaluation engines, two-tier detection β reveals how enterprise data protection actually operates. AkesoDLP exists for exactly this purpose: a fully transparent, source-available DLP platform that security practitioners can study, modify, and experiment with.
AkesoDLP inspects content across endpoints, network channels, and data at rest using a multi-technology detection engine and an enterprise-grade policy evaluation model.
Highlights:
- Kernel-mode minifilter driver intercepting file writes to USB/removable storage and network shares with true pre-operation blocking
- User-mode hooks for clipboard monitoring (NtUserSetClipboardData) and browser upload interception (WinHttpSendRequest)
- Dual detection engines β C++ agent (Hyperscan SIMD regex, Aho-Corasick keywords, native validators) and Python server (google-re2, pyahocorasick, full content extraction)
- 10 validated data identifiers with checksum/format validators: Credit Card (Luhn), SSN, IBAN (MOD-97), ABA Routing (3-7-1), Phone, Email, Passport, Driver's License, IPv4, Date of Birth
- Policy engine with compound rules (AND), multiple rules (OR), exception conditions (entire-message and matched-component-only), severity tiers, and match count thresholds
- Two-Tier Detection (TTD) β agent forwards to server for fingerprint matching and complex content extraction when local detection cannot evaluate
- Network monitor β HTTP proxy (mitmproxy) and SMTP relay (aiosmtpd) with inline block/modify/redirect capability
- Document fingerprinting via simhash for detecting full or partial content matches from indexed confidential documents
- Endpoint Discover β scan endpoints for sensitive data at rest with incremental scanning and CPU throttling
- Message decomposition model β content split into envelope, subject, body, and attachment components for targeted detection
- File content extraction β PDF, Office (docx/xlsx/pptx), ZIP/TAR/7z archives with recursive extraction (max depth 3)
- 6 built-in policy templates β PCI-DSS, HIPAA, GDPR, SOX, Source Code Leakage, Confidential Documents
- React management console with dark mode, policy editor, incident triage, agent management, and reporting
- AkesoSIEM integration β emits structured DLP events for cross-product correlation with EDR, AV, and NDR telemetry
- Shared kernel driver infrastructure with AkesoEDR β same minifilter framework, communication ports, service model, and build system
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β KERNEL MODE β
β β
β akeso-dlp-driver.sys (minifilter) β
β βββ IRP_MJ_WRITE pre-op callback β
β β β check volume type (removable? network share?) β
β β β send file path + first 4KB to user-mode via filter port β
β β β wait for verdict (ALLOW / BLOCK / SCAN_FULL) β
β β β BLOCK: FLT_PREOP_COMPLETE + STATUS_ACCESS_DENIED β
β β β ALLOW: FLT_PREOP_SUCCESS_WITH_CALLBACK β
β βββ IRP_MJ_CREATE post-op (Endpoint Discover file tracking) β
β βββ FltCommunicationPort ("\\AkesoDLPPort") β
βββββββββββββββββββββββββββββ boundary ββββββββββββββββββββββββββββ€
β USER MODE β
β β
β akeso-dlp-agent.exe (Windows service) β
β βββ DriverComm β FilterConnectCommunicationPort β
β βββ ContentInspector β text extraction (PDF, Office, archives)β
β βββ DetectionEngine β Hyperscan regex, Aho-Corasick keywords β
β β data identifier validators (Luhn, etc) β
β βββ TTDClient β forward to server for fingerprinting β
β βββ PolicyEvaluator β compound rules, exceptions, severity β
β βββ ResponseExecutor β block, notify, user-cancel, quarantine β
β βββ ClipboardMonitor β NtUserSetClipboardData hook β
β βββ BrowserMonitor β WinHttpSendRequest hook β
β βββ PolicyCache β SQLite local cache with version sync β
β βββ IncidentQueue β memory-mapped file (1000 entries FIFO) β
β βββ GrpcClient β mTLS to server (report, sync, TTD) β
β βββ Watchdog β health monitor + tamper protection β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β gRPC (mTLS)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SERVER STACK (Docker) β
β β
β akeso-dlp-server (Python/FastAPI) β
β βββ REST API β policies, incidents, agents, detect β
β βββ Auth β JWT + TOTP MFA + role-based access β
β βββ gRPC Service β agent registration, heartbeat, TTD β
β βββ SIEM Emitter β HTTP POST to AkesoSIEM β
β β
β akeso-dlp-detect (Python) β
β βββ RegexAnalyzer β google-re2 (safe, no backtracking) β
β βββ KeywordAnalyzer β pyahocorasick β
β βββ DataIdentifier β validators (Luhn, MOD-97, ABA, etc) β
β βββ FileTypeAnalyzer β python-magic (binary signatures) β
β βββ FingerprintAnalyzer β simhash rolling hash β
β βββ PolicyEvaluator β compound rule evaluation logic β
β β
β akeso-dlp-network (Python) β
β βββ HTTP Proxy β mitmproxy (inspect uploads, block) β
β βββ SMTP Relay β aiosmtpd (inspect email, block/modify)β
β β
β akeso-dlp-console (React) β
β βββ Dashboard, Incidents, Policies, Agents, Discover, Reports β
β βββ Dark mode, shadcn/ui, Recharts, shared SIEM design system β
β β
β PostgreSQL 16 β Redis 7 β MailHog (test MTA) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Language | Description |
|---|---|---|
| akeso-dlp-driver | C (WDK) | Windows minifilter driver. IRP_MJ_WRITE pre/post callbacks on monitored volumes. Filter communication port to user-mode agent. Shares architectural patterns with AkesoEDR's driver. |
| akeso-dlp-agent | C++17 (MSVC) | Endpoint agent Windows service. Hyperscan SIMD regex, Aho-Corasick keywords, data identifier validators. Policy cache, incident queue, clipboard/browser monitors, gRPC client. |
| akeso-dlp-server | Python/FastAPI | Management server. REST API, policy CRUD, incident management, user/role administration, gRPC service for agent communication, SIEM event emission. |
| akeso-dlp-detect | Python | Server-side detection engine. Pluggable analyzers (regex, keyword, data identifier, file type, fingerprint). Policy evaluation with compound AND/OR/exception logic. |
| akeso-dlp-network | Python | Network monitor. HTTP proxy (mitmproxy) and SMTP relay (aiosmtpd) with inline prevent capability (block, modify, redirect). |
| akeso-dlp-console | React/TypeScript | Web dashboard. Policy editor, incident triage, agent management, Endpoint Discover, reporting, user risk scoring. Dark mode with AkesoSIEM shared design system. |
| Technology | Agent (C/C++) | Server (Python) | Description |
|---|---|---|---|
| Regex matching | Hyperscan (SIMD, multi-pattern) | google-re2 (safe) | PCRE patterns against message components. Hyperscan evaluates thousands of patterns simultaneously. |
| Keyword matching | Aho-Corasick | pyahocorasick | Keyword lists, phrases, dictionaries. Case modes. Proximity matching. |
| Data identifiers | Native validators (Luhn, ABA, SSN) | Python validators | Pattern + validator model. 10 built-in identifiers with checksum validation. |
| File type detection | Magic bytes (libmagic) | python-magic | Binary signature detection for 50+ types. Does not rely on extension. |
| Document fingerprinting | Deferred to server (TTD) | Simhash rolling hash | Detect full or partial content matches from indexed confidential documents. |
| Content extraction | pdfium, libxml2, minizip | pdfplumber, python-docx, openpyxl | Extract text from PDF, Office, archives (recursive, max depth 3). |
| Channel | Mechanism | Pre-operation Block? |
|---|---|---|
| USB / Removable Storage | Minifilter IRP_MJ_WRITE pre-op on removable volumes | Yes |
| Network Shares | Minifilter IRP_MJ_WRITE pre-op on network volumes | Yes |
| Clipboard | NtUserSetClipboardData hook | Yes (pre-set) |
| Browser Upload | WinHttpSendRequest / HttpSendRequestW hook via DLL injection | Yes (pre-send) |
| HTTP Uploads | mitmproxy transparent proxy (POST/PUT body + multipart) | Yes (403 block) |
| SMTP Email | aiosmtpd relay (headers, body, attachments) | Yes (550 reject / modify / redirect) |
| Data at Rest | Endpoint Discover scan (incremental, CPU-throttled) | Quarantine |
| Action | Description |
|---|---|
| Block | Minifilter returns STATUS_ACCESS_DENIED. File moved to recovery folder. Notification displayed. |
| Notify | System tray toast notification with policy name and violation summary. |
| User Cancel | Modal dialog with justification field. Submit β allow with logged justification. Timeout β block. |
| Log | Always executes. Incident queued for server reporting. Persists to memory-mapped file if server unreachable. |
| Quarantine | Move file to quarantine folder. Marker stub left at original path with recovery instructions. |
| Template | Detects |
|---|---|
| PCI-DSS | Credit card numbers (Luhn-validated), cardholder data patterns |
| HIPAA | Medical record numbers, diagnosis codes, patient identifiers |
| GDPR | EU personal data β names + national IDs, IBAN, dates of birth |
| SOX | Financial statements, audit data, insider trading indicators |
| Source Code Leakage | Language-specific patterns, API keys, connection strings, certificates |
| Confidential Documents | Fingerprinted confidential documents, classification markers |
AkesoDLP fills the data protection role in the Akeso portfolio. Events emitted to AkesoSIEM enable cross-product correlation:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AkesoSIEM (Go + ES) β
β Central correlator β Sigma rules β alerting β
β β
β Ingests: akeso_edr | akeso_av | akeso_dlp | β
β akeso_ndr | windows | syslog β
ββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββββββββββ
β β β β
ββββββββ΄βββ βββββββ΄βββ ββββββ΄ββββ ββββββ΄βββββ
βAkeso β βAkeso β βAkeso β βAkeso β
βEDR β βAV β βDLP β βNDR β
βEndpoint β βMalware β βContent β βNetwork β
βbehavior β βdetect β βinspect β βmetadata β
βββββββββββ ββββββββββ ββββββββββ βββββββββββ
Cross-product correlation examples:
- EDR + DLP: User whose workstation triggered EDR credential theft alert accesses confidential file within 30 minutes
- NDR + DLP: NDR detects anomalous outbound volume to external IP β DLP confirms accessed files were classified as confidential
- EDR + NDR + DLP: Credential dump on Host A β lateral movement to Host B β sensitive file access on Host B β outbound data transfer
- Python 3.12+ β server, detection engine, network monitor
- Node.js 22+ β React console
- Docker & Docker Compose β infrastructure services
- Visual Studio 2022 with C++ desktop workload β agent (Windows only)
- Windows Driver Kit (WDK) β minifilter driver (Windows only)
- CMake 3.20+ β agent build system
# Start all services (PostgreSQL, Redis, FastAPI, React, MailHog)
docker compose up -d
# Verify all healthy
docker compose ps# Install dependencies
make server-install
# Start FastAPI dev server on :8000
make server# Install dependencies
make console-install
# Start Vite dev server on :3000
make console# Configure and build
make agent
# Or step by step:
cmake -S agent -B agent/build -DCMAKE_BUILD_TYPE=Debug
cmake --build agent/build --config Debug# API health check
(Invoke-WebRequest http://localhost:8000/api/health).Content
# Console
(Invoke-WebRequest http://localhost:3000).StatusCode
# MailHog
(Invoke-WebRequest http://localhost:8025).StatusCodeclaude-dlp/
βββ Makefile Build targets (server, console, agent, docker, test)
βββ docker-compose.yml PostgreSQL, Redis, FastAPI, React, MailHog
βββ requirements.txt Python dependencies
βββ server/ Python server package
β βββ main.py FastAPI application entry point
β βββ config.py Settings (database, redis, auth, SIEM)
β βββ database.py SQLAlchemy async engine + session
β βββ models/ SQLAlchemy ORM models
β βββ schemas/ Pydantic request/response schemas
β βββ routes/ FastAPI route handlers
β βββ services/ Business logic layer
β βββ proto/ Generated gRPC stubs
β βββ scripts/ Seed data, MFA reset, utilities
β βββ Dockerfile Server container image
βββ agent/ C/C++ endpoint agent
β βββ CMakeLists.txt CMake build configuration
β βββ src/ Agent source (main, detection, policy, response)
β βββ include/ Agent headers
β βββ driver/ Minifilter driver source
β βββ config/ Agent YAML configuration
βββ console/ React management console
β βββ src/ App source (pages, components, hooks)
β βββ public/ Static assets
β βββ vite.config.ts Vite + Tailwind + API proxy
β βββ Dockerfile Console container image
βββ proto/ Shared protobuf definitions
βββ scripts/ Utility scripts (wait-for-db, cert gen)
βββ migrations/ Alembic database migrations
| Phase | Description | Status |
|---|---|---|
| P0 | Project scaffolding, Docker, database schema, protobuf | Complete |
| P1 | Server-side detection engine (regex, keywords, data IDs, file type, fingerprint) | Complete |
| P2 | REST API & React console (auth, policies, incidents, agents) | Complete |
| P3 | Endpoint agent core β minifilter driver, service, gRPC, policy cache | Complete |
| P4 | Endpoint agent detection & response β Hyperscan, hooks, blocking, notifications | Complete |
| P5 | Network monitor β HTTP proxy, SMTP relay, inline prevent | Complete |
| P6 | Document fingerprinting (simhash) | Complete |
| P7 | Endpoint Discover β data at rest scanning | Complete |
| P8 | Reporting, user risk scoring, SIEM event export | Complete |
| P9 | Console polish, agent management, demo environment | Complete |
| P10 | Integration testing & documentation | Complete |
| P11 | Hardening & production readiness (metrics, load testing, packaging) | Complete |
Total: 86 tasks, 12 phases. 71 PRs merged. All phases complete.
See REQUIREMENTS.md for the full implementation roadmap.
MIT License. See LICENSE.
This is an educational proof-of-concept built for learning and portfolio purposes. It is not production security software. Deploy only in authorized, isolated test environments.
- Evading EDR by Matt Hand (No Starch Press, 2023) β shared kernel driver infrastructure patterns with AkesoEDR
