eBPF
A Linux kernel facility that runs verified, sandboxed programs on kernel hooks, used for observability, networking and runtime security without kernel modules.
eBPF lets user space load small programs into the kernel and attach them to hooks: kprobes and tracepoints (syscalls, kernel functions), LSM hooks (security decisions), XDP and tc (packets), uprobes (user-space functions). Before loading, the verifier proves the program terminates and only touches memory it is allowed to; then it is JIT-compiled. Programs share state with user space through maps and ring buffers.
Security tools use it because it sees every exec, file open and connect with low overhead and without a kernel module that can panic the box. Falco, Tetragon and most modern EDR agents for Linux are eBPF-based; Cilium uses it for network policy; DDoS edges use XDP to drop packets before the network stack allocates memory.
Pitfalls: filter in-kernel or you drown user space in events; kernel version differences need CO-RE (compile once, run everywhere) with BTF. eBPF is also an attacker tool: loading programs needs CAP_BPF or CAP_SYS_ADMIN, and malicious eBPF rootkits can hide processes or tamper with syscalls, so monitor bpf() calls.
Learn it properly
Also used in
- Users, permissions and capabilitiesSecEng · Linux & OS security basicsFree
- Hardening and patchingSecEng · Linux & OS security basicsFree
- Packet capture basicsAnalyst · Networking & logs for analystsFree
- Sandboxing and privilege separationSecEng · Vulnerability research & exploit mitigationsPro
- Linux intrusion triageAnalyst · Investigations beyond WindowsPro