eBPF Guard
Building a Mini EDR with eBPF
This project is a mini EDR built as a portfolio piece for a junior eBPF security engineer role. It observes behavior on a Linux endpoint and writes suspicious events as JSON Lines logs.
Instead of trying to imitate a large commercial EDR, this project focuses on implementing a small security pipeline end to end: collecting events from execve, openat, and connect syscalls, processing them in a user-space rule engine, and writing structured logs.
Posts
-
Building a Mini EDR with eBPF 1: MVP Design
This post describes the MVP structure: collecting
execve,openat, andconnectthrough tracepoints, passing events through a BPF ring buffer, and handling rule matching and JSONL output in user space. The kernel side focuses on event collection, while user space handles decisions and output. -
Building a Mini EDR with eBPF 2: Improving File Access Detection
This post improves the first version of
openatdetection, which only observed syscall entry and could not tell whether access actually succeeded. It connectssys_enter_openatandsys_exit_openat, separates/etc/shadowaccess attempts from successful opens, and splits the policy intoSHADOW_OPEN_ATTEMPTandSHADOW_OPEN_SUCCESS. -
Building a Mini EDR with eBPF 3: Reducing False Positives in SUSPICIOUS_CONNECT
This post improves how
connectevents are interpreted by enriching command line context in user space and adding destination IP classification, allowlists, and suppression handling. The focus is not to expand detection blindly, but to leave logs that are more worth investigating.