
Case Study 01 // Horizon Tech Services
Endpoint Protection Engine
A native Windows endpoint agent delivering real-time file detection and automated response for a commercial EPP/EDR platform.
- Role
- Security Research Engineer
- Stack
- C++ / Win32 / Python
- Period
- 2025 — Present
- Domain
- Endpoint Security
How do we monitor every filesystem operation without becoming the overhead the user notices?
01 / The Architecture
The Engine.
Real-Time Detection
The native core normalises filesystem I/O events and hands them to a bounded, lock-free queue for analysis.
Device Control
USB and peripheral access policies enforced through Win32 device management APIs to block physical exfiltration.
OS-Level Hardening
Process tokens, session boundaries and filesystem behaviour used to harden end-user machines.
02 / Implementation
Engineering a resilient agent.
The execution layer uses a bounded queue with an auto-recovery window so a worker crash never loses in-flight detections.
agent_core.cpp
// Bounded, lock-free dispatch between the driver and analysis workersclass DispatchQueue {public:explicit DispatchQueue(std::size_t capacity): queue_(capacity) {}// Called from the interception path. Never blocks.bool tryEnqueue(FileEvent&& event) {return queue_.try_enqueue(std::move(event));}// Analysis workers drain in batches, applying back-pressure by// dropping into sampled mode instead of stalling the caller.std::size_t drain(std::vector<FileEvent>& out, std::size_t max) {return queue_.try_dequeue_bulk(out.begin(), max);}private:moodycamel::ConcurrentQueue<FileEvent> queue_;};
Real-Time
Filesystem I/O monitoring
Lock-Free
Task queue architecture
AMSI / PPL
Interception & anti-tamper
Auto-Recovery
Crash-resilient execution