Skip to main content

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/)​

ObjectHooksEvent types
kavach_exec.osched_process_execexec (+ path, cgroup, lost counter)
kavach_process.ofork / exitfork, exit
kavach_file.osys_enter_openatfile (path metadata only)
kavach_priv.osetuid, memfd, ptrace, init_module, bpfpriv, memfd, ptrace, module, bpf
kavach_net.osys_enter_connectnet (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:

VariableMeaning
KAVACH_BPF_OBJDirectory with *.o
KAVACH_BPF_PINExec ringbuf pin (default /sys/fs/bpf/kavach/events)
KAVACH_BPF_PIN_ROOTPin 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​

KavachNetra
Host process/file/priv/connect observeTCX/XDP/cgroup datapath
/v1/ebpf/netra/* mirrorCanonical /api/v1/ebpf/*
Never writes Netra mapsMay enforce under lease

See also​