Falco real time runtime thread detection on k8s
Installation and usage of falco inside kubernetes
Installation
Install falco helm repository
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm repo updateDeploy falco using helm.
In this demo we also enabled the graphical dashboard UI
helm upgrade --install \
--namespace falco \
--create-namespace \
falco falcosecurity/falco \
--set falcosidekick.enabled=true \
--set falcosidekick.webui.enabled=trueWait for the pods to be ready
Create a demo deployment
kubectl create deployment nginx --image=nginxOnce pods are ready execute a call in /etc/shadow file which will trigger a warning in falco
kubectl exec -it $(kubectl get pods --selector=app=nginx -o name) -- cat /etc/shadowVerify that the warning has been triggered
Ingress
To access the web UI you can port-forward the service or create an ingress.
We will create an ingress.
Create the ingress in the falco namespace
In my example you can access the dashboard using http://falco.192.168.39.115.nip.io
Username admin and password admin by default.
Custom rules
Create a file with your custom rules falco_custom_rules_cm.yaml
Here is an example to trigger alert when a container executes id command
Custom rules documentation https://falco.org/docs/rules/basic-elements/
Update the helm with custom rules
Trigger warning
Check falco logs to verify alert is triggered
Last updated
Was this helpful?