eBPF observe platform
Kavach ships Falco / Tracee / Tetragon-observe class host telemetry.
Never kill, isolate, LSM-deny, or drop packets. Network datapath enforce belongs to Netra.
Programs (bpf/)
| Object | Hooks | Event types |
|---|---|---|
kavach_exec.o | sched_process_exec | exec (+ path, cgroup, lost counter) |
kavach_process.o | fork / exit | fork, exit |
kavach_file.o | sys_enter_openat | file (path metadata only) |
kavach_priv.o | setuid, memfd, ptrace, init_module, bpf | priv, memfd, ptrace, module, bpf |
kavach_net.o | sys_enter_connect | net (observe connect) |
Shared header: kavach_common.h.
Build & pin (Linux)
./scripts/build-bpf.sh
sudo mkdir -p /sys/fs/bpf/kavach
# example — exact bpftool flow depends on your kernel/BTF:
sudo bpftool prog loadall bpf/kavach_exec.o /sys/fs/bpf/kavach/exec
sudo bpftool map pin name events /sys/fs/bpf/kavach/events
Env:
| Variable | Meaning |
|---|---|
KAVACH_BPF_OBJ | Directory with *.o |
KAVACH_BPF_PIN | Exec ringbuf pin (default /sys/fs/bpf/kavach/events) |
KAVACH_BPF_PIN_ROOT | Pin root for status/attachments |
Without pins or CAP_BPF, the agent falls back to proc connector → /proc poll. That is supported and expected on many labs.
HTTP API
GET /v1/ebpf/status
GET /v1/ebpf/health
GET /v1/ebpf/coverage
GET /v1/ebpf/capabilities
GET /v1/ebpf/attachments
GET /v1/ebpf/maps
GET /v1/ebpf/census
GET /v1/ebpf/summary
GET /v1/ebpf/drops # ringbuf lost samples — not packet drops
GET /v1/ebpf/events?type=exec
POST /v1/ebpf/events # { "events": [...], "lost": N }
GET /v1/ebpf/processes
GET /v1/ebpf/features
POST /v1/ebpf/features/{id} # { "mode": "auto"|"on"|"off" } — load gate only
GET /v1/ebpf/netra/status|drops|flows|attachments
All status payloads include "enforce": false (or equivalent note).
CLI
kavachctl ebpf status
kavachctl ebpf health
kavachctl ebpf events --type memfd
kavachctl ebpf attachments
kavachctl ebpf features
kavachctl ebpf features set net off
kavachctl ebpf netra status
Console
Browse → eBPF — health band, feature table, recent events.
Netra boundary
| Kavach | Netra |
|---|---|
| Host process/file/priv/connect observe | TCX/XDP/cgroup datapath |
/v1/ebpf/netra/* mirror | Canonical /api/v1/ebpf/* |
| Never writes Netra maps | May enforce under lease |