[!CAUTION] Falco Talon needs to be installed before Falco and Falco Sidekick
git clone https://github.com/falcosecurity/charts.git
cd charts/charts/falco-talon
rm rules.yaml
wget 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 falcosecurity
Visit 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.yaml
helm 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.yaml
[!IMPORTANT] 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=falco
kubectl port-forward -n falco svc/falco-falcosidekick-ui 2802:2802
[!NOTE] 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.yaml
kubectl exec -it $(kubectl get pods -l app=ubuntu -o jsonpath='{.items[0].metadata.name}') -- /bin/bash
kubectl 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-red
kubectl apply -f https://raw.githubusercontent.com/janudabethmin/falco-setup/refs/heads/main/atomic-red.yaml
kubectl exec -it -n atomic-red deploy/atomicred -- bash
pwsh
Import-Module "~/AtomicRedTeam/invoke-atomicredteam/Invoke-AtomicRedTeam.psd1" -Force
Invoke-AtomicTest T1070.004 -ShowDetails
Invoke-AtomicTest T1070.004 -GetPreReqs
Invoke-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/null
grep "aws_secret_access_key" /etc/shadow
kubectl exec -it $(kubectl get pods -l app=ubuntu -o jsonpath='{.items[0].metadata.name}') -- /bin/bash
find /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.