
EDR eBPF di sola verifica per Linux 5.15+ LTS: 14 hook del kernel, 15 azioni (13 tecniche MITRE), lineage dei processi, esportazione SIEM, pronto per K8s/Docker.
Solo rilevamento e audit. Sensore non applicativo. Nessun programma BPF restituisce
-EPERM; nessuna syscall viene bloccata. Questo agente è un piano di osservazione runtime, non un piano di prevenzione. Vedidocs/SECURITY.mdeTHREAT_MODEL.md.
Un agente EDR per Linux ultra leggero, solo audit, realizzato con eBPF (C) e un daemon Go altamente efficiente. È destinato a Linux kernel 5.15 LTS e versioni successive, con un hot path a zero allocazioni, un footprint di memoria inferiore a 30MB e un profondo arricchimento del contesto container/K8s.
CRITICAL.cgroup_id su Pod Name, Namespace e ServiceAccount senza appesantire il formato wire del kernel da 208 byte.0.40% di CPU in idle e 0 drop del ringbuf sotto uno stress test di 25.000 fork.Stato: Fase 2.7 completata. 13 tecniche MITRE ATT&CK su 16 azioni. Verificato end to end su kernel 6.12.111 (82 PASS / 0 FAIL).
| # | Azione | Gravità | MITRE | Hook |
|---|---|---|---|---|
| 1 | Container_Namespace_Unshare | HIGH | T1611 | kprobe/__x64_sys_unshare |
| 2 | Container_Pivot_Root_Escape | CRITICAL | T1611 | kprobe/__x64_sys_pivot_root |
| 3 | Sensitive_File_Access | HIGH | T1003.008 | tracepoint/sys_enter_openat + open |
| 4 | Process_Execution | INFO/MEDIUM | T1059.004 | tracepoint/sys_enter_execve |
| 5 | Network_Connection | INFO/HIGH | T1071 | tracepoint/sys_enter_connect |
| 6 | Process_Injection | HIGH | T1055.008 | tracepoint/sys_enter_ptrace |
| 7 | Log_Tampering | HIGH | T1562.001 | tracepoint/sys_enter_unlinkat |
| 8 | Ebpf_Tampering | HIGH | T1562.001 | tracepoint/sys_enter_bpf |
| 9 | Perf_Event_Open | MEDIUM | T1562.001 | tracepoint/sys_enter_perf_event_open |
| 10 | Suspicious_Mount | HIGH | T1611 | tracepoint/sys_enter_mount |
| 11 | Namespace_Switch | HIGH | T1611 | tracepoint/sys_enter_setns |
| 12 | Chroot_Escape | HIGH | T1611 | tracepoint/sys_enter_chroot |
| 13 | Executable_Memory | MEDIUM | T1620 | tracepoint/sys_enter_mprotect |
| 14 | Core_Pattern_Modification | CRITICAL | T1611 | tracepoint/sys_enter_openat + open |
| 15 | Cgroup_Release_Agent | CRITICAL | T1611 | tracepoint/sys_enter_openat + open |
| 16 | Canary_Triggered | CRITICAL | T1552.001 | tracepoint/sys_enter_openat + open |
Le azioni 9 e 13 sono collegate ma soppresse lato kernel per impostazione predefinita tramite
disabled_actions in config.toml.
Gli hook del kernel (14) alimentano un filtro comm/cgroup, una ricerca hash O(1) su canary_paths, poi una ricerca su action_enabled. Gli eventi vengono inviati a un ringbuf da 1 MiB che trasporta record da 208 byte. Lo userspace legge in un buffer pooled fisso, applica un token bucket per azione, arricchisce con la lineage del processo e il percorso cgroup, e con i metadati del Pod K8s da cache LRU limitate, e instrada attraverso un Encoder + Sink verso qualsiasi destinazione.
Dettagli completi: docs/ARCHITECTURE.md.
ebpf edr esporta gli avvisi verso qualsiasi SIEM tramite un livello formato + trasporto.
[output]
format = "ecs" # json | ecs | ocsf | cef | leef
target = "webhook" # file | stdout | syslog | webhook
[output.webhook]
url = "https://splunk.internal:8088/services/collector/event"
auth_header = "Splunk ${SPLUNK_HEC_TOKEN}"
splunk_hec = true
Trasporti supportati: file, stdout, syslog (UDP/TCP/TLS), webhook HTTPS. Formati supportati: JSON nativo, ECS 8.11, OCSF 1.3.0, CEF, LEEF 2.0.
Ricette per Splunk, Elastic, Sentinel, QRadar e syslog generico:
docs/SIEM_INTEGRATION.md.
In assenza di [output], il comportamento è identico byte per byte alla v1.x.
CONFIG_DEBUG_INFO_BTF=y (/sys/kernel/btf/vmlinux)docs/KERNEL_COMPATIBILITY.md per la matrice completa.CAP_BPF CAP_PERFMON CAP_SYS_ADMINmake kernel # kernel/bpf_program.o
make userspace # userspace/ebpf_controller
make emulation # emulation/adversary
sudo -E make verify
Esegue la sonda dell'ambiente, la compilazione, l'asserzione del layout delle struct C/Go, la dry-run del verificatore BPF, lo smoke test a runtime, l'emulazione dell'avversario, le prestazioni, la matrice di configurazione, il reload SIGHUP, la CPU in idle, l'arricchimento della lineage, i limiti della cache, i nuovi hook, la matrice dei formati e la consegna del webhook.
sudo ./install.sh --dry-run
sudo ./install.sh
sudo ./install.sh --uninstall
Installa /usr/local/sbin/ebpf-edr,
/usr/local/lib/ebpf-edr/bpf_program.o,
/etc/ebpf-edr/config.toml (quello esistente viene preservato; il nuovo default in .new),
/etc/systemd/system/ebpf-edr.service,
/etc/logrotate.d/ebpf-edr.
TOML in /etc/ebpf-edr/config.toml. Precedenza: CLI > env (EDR_*) > file > default.
mode = "audit"
disabled_actions = [
"Perf_Event_Open",
"Executable_Memory",
]
[log]
path = "/var/log/ebpf_edr.json"
max_bytes = 52428800
max_backups = 5
level = "info"
[filter]
comm_allowlist = []
cgroup_allowlist = []
canary_paths = ["/var/run/secrets/kubernetes.io/serviceaccount/token"]
[k8s]
enrichment = true
[rates]
events_per_sec = 200
burst = 400
[container]
cache_max_entries = 5000
[context]
lineage_max_depth = 16
lineage_cache_size = 20000
cgroup_cache_size = 5000
Reload: sudo systemctl reload ebpf-edr. mode = "enforce" viene rifiutato;
questa build è solo in modalità audit.