#!/bin/bash apt update apt install containerd -y systemctl stop containerd containerd config default | sed 's/SystemdCgroup.*=.*false/SystemdCgroup = true/g' > /etc/containerd/config.toml systemctl start containerd systemctl enable containerd mkdir -p /etc/containerd cat < /dev/null echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list sudo apt-get update sudo apt-get install trivy # falco curl -fsSL https://falco.org/repo/falcosecurity-packages.asc | \ sudo gpg --dearmor -o /usr/share/keyrings/falco-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/falco-archive-keyring.gpg] https://download.falco.org/packages/deb stable main" | \ tee -a /etc/apt/sources.list.d/falcosecurity.list apt-get update -y # non-eBPF #apt install -y dkms make linux-headers-$(uname -r) # If you use falcoctl driver loader to build the eBPF probe locally you need also clang toolchain #apt install -y clang llvm # You can install also the dialog package if you want it #apt install -y dialog apt-get install -y falco mkdir -p /usr/share/falco/plugins curl -Lo /tmp/falcorules.tar.gz https://download.falco.org/rules/falco-incubating-rules-3.0.1.tar.gz ( cd /etc/falco/rules.d tar xvfz /tmp/falcorules.tar.gz ) if grep ubuntu /etc/os-release then falcoctl driver config --type ebpf falcoctl driver install systemctl start falco-bpf systemctl enable falco-bpf else falcoctl driver config --type modern_ebpf #falcoctl artifact install k8saudit-rules systemctl enable falco-modern-bpf systemctl restart falco-modern-bpf fi