Caution
Falco Talon needs to be installed before Falco and Falco Sidekick
git clone https://github.com/falcosecurity/charts.gitcd charts/charts/falco-talonrm rules.yamlwget https://raw.githubusercontent.com/janudabethmin/falco-setup/refs/heads/main/rules.yaml Important
Remember to be in the charts/charts/falco-talon directory before running the command below.
helm upgrade --install falco-talon -n falco --create-namespace .kubectl create namespace falco
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm repo update falcosecurityVisit Falco Rules Explorer for detailed view of falco rules.
helm install falco falcosecurity/falco --namespace falco \
--create-namespace \
--set tty=true \
--set falcosidekick.enabled=true \
--set falcosidekick.webui.enabled=true \
--set falcosidekick.webui.redis.storageEnabled=false \
--set falcosidekick.config.webhook.address=http://falco-talon:2803 helm install falco falcosecurity/falco --namespace falco \
--create-namespace \
--set tty=true \
--set falcosidekick.enabled=true \
--set falcosidekick.webui.enabled=true \
--set falcosidekick.webui.redis.storageEnabled=false \
--set falcosidekick.config.webhook.address=http://falco-talon:2803 \
-f custom-rules.yamlhelm upgrade falco falcosecurity/falco --namespace falco \
--set tty=true \
--set falcosidekick.enabled=true \
--set falcosidekick.webui.enabled=true \
--set falcosidekick.webui.redis.storageEnabled=false \
--set falcosidekick.config.webhook.address=http://falco-talon:2803 \
--reuse-values \
-f custom-rules.yamlImportant
The custom rule that we are adding here is for a attomic red test that will not be identified by Falco default rules. Will be described in the next section.
kubectl logs -n falco -c falco -f -l app.kubernetes.io/name=falcokubectl port-forward -n falco svc/falco-falcosidekick-ui 2802:2802Note
Default username and password both for Falco Sidekick UI is admin
kubectl apply -f https://raw.githubusercontent.com/janudabethmin/falco-setup/refs/heads/main/ubuntu-pod.yamlkubectl exec -it $(kubectl get pods -l app=ubuntu -o jsonpath='{.items[0].metadata.name}') -- /bin/bashkubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco | grep 'Warning Grep private keys'find /root -name "id_rsa"kubectl create namespace atomic-redkubectl apply -f https://raw.githubusercontent.com/janudabethmin/falco-setup/refs/heads/main/atomic-red.yamlkubectl exec -it -n atomic-red deploy/atomicred -- bashpwshImport-Module "~/AtomicRedTeam/invoke-atomicredteam/Invoke-AtomicRedTeam.psd1" -ForceInvoke-AtomicTest T1070.004 -ShowDetailsInvoke-AtomicTest T1070.004 -GetPreReqsInvoke-AtomicTest T1070.004| Attack | Command to View Logs | Grep the specific logs using pipes | Command to Execute Attack | Description | Identified by Default Falco Rules? |
|---|---|---|---|---|---|
| T1070.004 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
grep 'Bulk data has been removed from disk' |
Invoke-AtomicTest T1070.004 |
Bulk file deletion | Yes |
| T1556.003 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
grep 'Sensitive file opened for reading by non-trusted program' |
Invoke-AtomicTest T1556.003 |
Modify Authentication Process | Yes |
| T1036.005 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
grep 'Executing binary not part of base' |
Invoke-AtomicTest T1036.005 |
Masquerading: Match Legitimate Name or Location | Yes |
| T1070.002 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
grep 'Log files were tampered' |
Invoke-AtomicTest T1070.002 |
Indicator Removal on Host | Yes |
| T1070.003 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
grep 'Shell history had been deleted or renamed' |
Invoke-AtomicTest T1070.003 |
Clear Command History | Yes |
| T1014 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
```grep 'Linux Kernel Module injection from container detected'` | Invoke-AtomicTest T1014 |
Kernel Module Based Rootkit | Yes |
| T1037.004 | kubectl logs -f --tail=0 -n falco -c falco -l app.kubernetes.io/name=falco |
grep 'Potentially malicious Python script' |
Invoke-AtomicTest T1037.004 |
Boot Initialization - RC Scripts | No |
Important
We have added the custom rule for the T1070.004 attack to the custom-rules.yaml file. Use the commands in the previous section to add the custom rules to Falco.
find /root -name "id_rsa"cat /etc/shadow > /dev/nullgrep "aws_secret_access_key" /etc/shadowkubectl exec -it $(kubectl get pods -l app=ubuntu -o jsonpath='{.items[0].metadata.name}') -- /bin/bashfind /root -name "id_rsa"Note
This will add a tag suspicious: "true" to the Ubuntu Pod as a responce to the detection done by falco, as we wrote in the falco-talon rules.