Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
The quick answer
FALCO_FRONTEND=noninteractive FALCO_DRIVER_CHOICE=modern_ebpf dnf -y install falco
systemctl enable --now falco-modern-bpf.service
docker run --rm -it alpine:3.22 sh -c 'echo test'
journalctl -u falco-modern-bpf -n 20 --output cat | grep -i shell(Add the Falco repository first — see the full guide.) In Kubernetes install it as a DaemonSet with the Helm chart.
Step by step
- Install (quick answer, or Helm for Kubernetes):
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm upgrade --install falco falcosecurity/falco -n falco --create-namespace --set driver.kind=modern_ebpf- Trigger a test — open a shell in a running container:
kubectl exec -it deploy/api -n shop -- sh -c 'id'Falco logs a line like:
Notice A shell was spawned in a container with an attached terminal (user=root container=api pod=api-6d8f9c7b5d-x2kq9 ns=shop image=registry.example.com/shop/api)- Your own rule — in your own file (never edit the shipped rules):
- list: shell_binaries_shop
items: [bash, sh, zsh, ash, dash]
- rule: Shell in shop container
desc: A shell started inside a shop container
condition: >
spawned_process and container
and proc.name in (shell_binaries_shop)
and k8s.ns.name = "shop"
output: >
Shell in shop container (user=%user.name cmd=%proc.cmdline pod=%k8s.pod.name image=%container.image.repository)
priority: WARNING
tags: [container, shell]- Tune the noise — allow known, expected processes (a backup job, a debug tool) with exceptions in your file, instead of turning rules off.
- Send alerts out — logs alone are not alerts. Use Falcosidekick (Slack, Teams, Alertmanager, Loki, SIEM) or
json_output: trueand ship the journal to your SIEM. - React: who ran it (
kubectlaudit log forexec), which Pod, which image — then isolate (NetworkPolicy deny-all, scale to 0, keep the node for forensics).
Check that it worked
systemctl status falco-modern-bpf (or the Falco Pods) is running, the test exec produces an alert within seconds, your own rule fires for the shop namespace, and the alert reaches the channel where on-call people see it.
Common problems
| Problem | Cause | Fix |
|---|---|---|
| Falco does not start (driver error) | Kernel too old for modern_ebpf. | Use a newer kernel (5.8+), or the ebpf/kmod driver. |
No k8s.* fields in alerts | No container runtime metadata. | Run as the Helm DaemonSet; check the container runtime socket settings. |
| Hundreds of alerts per hour | Default rules match normal tools. | Add exceptions for known processes; review noisy rules. |
| Your rule never fires | Condition too narrow, or file not loaded. | falco --dry-run (checks config and all rule files); falco -L lists the loaded rules; test step by step. |
| Alerts only in the local log | No output configured. | Falcosidekick or ship JSON logs to the SIEM. |
| Performance worries | eBPF overhead. | Normally small; monitor CPU; limit custom rules to needed syscalls. |
Go further
- Command pages: falco, kubectl, helm.
- Next how-tos: Open a shell in a running Pod, Write a Kubernetes NetworkPolicy, Send alerts to Slack or email.
- Full guide: Falco. Learn it: CKS — Falco, CKS — Investigate. At work: Falco.
- Practise: Lab: turn on audit logging and catch a shell with Falco.
1Why is a shell inside a production container worth an alert?
Containers should only run their app; a shell means manual access or an attacker.
2Where do you put your own Falco rules?
In your own files (/etc/falco/rules.d/ or falco_rules.local.yaml), never in the shipped rules file.