Skip to content

Container Runtime Detection

github-actions[bot] edited this page Nov 29, 2026 · 1 revision

Last reviewed: 2026-11-28 (source and release review only; Falco, Tetragon and Kubernetes audit logging were not run or CI-verified in this repository, see Why This Is Not CI-Verified Here)

Prerequisites: Container security ยท Kubernetes security ยท Detection content validation.

๐ŸŽฏ Purpose

Explain what runtime sensors and Kubernetes audit logs can see after a workload is admitted, which events are worth alerting on, and the operational limits of each source.

โš™๏ธ Function

Covers Falco and Tetragon (kernel-level sensors), Kubernetes API audit logging, a starting alert list mapped to Falco's stable rules and to audit events, and why this repository has no CI lab for them.

๐Ÿ† Goal

Let a reader choose a sensor, configure an audit policy that captures security-relevant API calls without logging Secret contents, and set honest expectations about what an alert proves.

๐Ÿ“‹ When To Use

  • Planning detection for a Kubernetes cluster after admission controls are in place
  • Reviewing whether an audit policy captures exec, Secret reads and RBAC changes
  • Deciding between Falco and Tetragon

๐Ÿ“‹ Table Of Contents


Detection Sources

Source Sees Misses
Kubernetes audit log Every API request: who, which verb, which object, from where Anything inside a container that does not call the API
Kernel sensor (Falco, Tetragon) Process execution, file access, network connections, privilege changes on the node API-level intent; events on nodes where the sensor is not running or not loaded
Container runtime and node logs Container start/stop, image pulls, kubelet errors Process behaviour inside containers
Cloud control plane logs Calls made with cloud credentials obtained through workload identity In-cluster activity

Use more than one. An attacker who execs into a Pod shows up in the audit log (the pods/exec request) and in the sensor (a shell process). Correlating the two is stronger evidence than either alone.

Falco

  • Latest release: 0.45.2 (2026-10-29). CNCF graduated project (2024-02-29). Apache-2.0.
  • Drivers (kernel event sources): the modern eBPF probe is the default and is bundled in the binary. It needs a BPF ring buffer and BTF; kernels 5.8 and later are usually enough. Its minimal capabilities are CAP_BPF, CAP_PERFMON, CAP_SYS_RESOURCE and CAP_SYS_PTRACE. The kernel module "requires full privileges and cannot run with Linux capabilities".
  • Removed features: v0.43.0 deprecated the legacy eBPF probe, gVisor support and gRPC output; v0.44.0 removed them (CHANGELOG). Older guides that use the legacy probe or gRPC output no longer apply.

The least-privilege container command from Falco's container setup docs. It uses sys_admin because, per those docs, Docker does not yet support CAP_BPF and CAP_PERFMON:

docker run --rm -it --cap-drop all --cap-add sys_admin --cap-add sys_resource --cap-add sys_ptrace \
  -v /sys/kernel/tracing:/sys/kernel/tracing:ro \
  -v /var/run/docker.sock:/host/var/run/docker.sock \
  -v /proc:/host/proc:ro -v /etc:/host/etc:ro \
  falcosecurity/falco:0.45.2

Pin the image by digest in production; this repository did not record a digest for it.

Rules. The falcosecurity/rules repository ships three maturity levels: stable (falco_rules.yaml, the only file bundled with Falco by default), incubating and sandbox. Its README says only the latest rules release is guaranteed to work with the latest Falco, and advises treating the rules "as examples" that need tuning. The latest rules release on 2026-11-28 was falco-rules-5.2.0.

Tetragon

  • Latest release: v1.8.0 (2026-10-30), a Cilium sub-project. Apache-2.0.
  • Requirements (FAQ): kernel 4.19 or later (5.10 or later recommended on arm64) and BTF (/sys/kernel/btf/vmlinux, CONFIG_DEBUG_INFO_BTF=y).
  • Policy model: TracingPolicy objects (apiVersion: cilium.io/v1alpha1) attach to kernel functions (for example kprobes with call: "fd_install" in the upstream examples) with selectors that filter in the kernel. Policies can also act, not only observe: the upstream killer.yaml example uses a NotifyEnforcer match action.

Falco is rule-driven with a large maintained rule set; Tetragon is closer to a programmable tracing layer where you write the policy. Neither was deployed here.

Kubernetes Audit Logs

From Auditing:

  • Nothing is logged unless the API server has --audit-policy-file.
  • Stages: RequestReceived, ResponseStarted, ResponseComplete, Panic.
  • Levels: None, Metadata, Request, RequestResponse.
  • Backends: log file (--audit-log-path, with --audit-log-maxage, --audit-log-maxbackup, --audit-log-maxsize) or webhook (--audit-webhook-config-file).

A starting policy that keeps Secret values out of the log while recording who touched them. It uses only fields from the documented examples, but it has not been run on a cluster here:

apiVersion: audit.k8s.io/v1
kind: Policy
omitStages:
  - RequestReceived
rules:
  # Secrets and tokens: record who and what, never the body
  - level: Metadata
    resources:
      - group: ""
        resources: ["secrets", "serviceaccounts/token"]
  # Interactive access and RBAC changes: keep the request body
  - level: Request
    resources:
      - group: ""
        resources: ["pods/exec", "pods/attach", "pods/portforward"]
      - group: "rbac.authorization.k8s.io"
        resources: ["roles", "rolebindings", "clusterroles", "clusterrolebindings"]
  # Everything else at Metadata
  - level: Metadata

Rules are matched in order and the first match wins, so put narrow rules first. On managed clusters, enable the provider's control plane audit logging instead of setting flags. For kind, the kind auditing guide mounts a policy file with kubeadmConfigPatches. That guide uses map-style extraArgs; kind v0.32.0 and later use kubeadm v1beta4 (list-style extraArgs) for Kubernetes 1.36+ and state that they translate old-style patches automatically. This was not tested.

What To Alert On

A starting set. Tune each against your own baseline before paging anyone.

Behaviour Audit log signal Falco stable rule (falco-rules-5.2.0)
Interactive shell in a container create on pods/exec or pods/attach Terminal shell in container
Container talking to the API server unexpectedly Requests from a ServiceAccount that normally makes none Contact K8S API Server From Container
Reading credentials get/list on secrets by an unusual subject Read sensitive file untrusted, Find AWS Credentials, Search Private Keys or Passwords
Privilege escalation through RBAC create/update on clusterrolebindings or rolebindings, especially to cluster-admin n/a
Privileged or host-namespace workloads create on pods with privileged, hostPID, hostNetwork or hostPath (should already be blocked by PSA) n/a
Container escape attempts n/a Detect release_agent File Container Escapes, Linux Kernel Module Injection Detected, Debugfs Launched in Privileged Container
Dropping and running new binaries n/a Drop and execute new binary in container, Execution from /dev/shm, Fileless execution via memfd_create
Reverse shells and tooling n/a Redirect STDOUT/STDIN to Network Connection in Container, Netcat Remote Code Execution in Container
Covering tracks delete on events Clear Log Activities

Rule names were read from rules/falco_rules.yaml at tag falco-rules-5.2.0. They change between releases, so re-check them when you upgrade.

Note

An alert is an observation that a rule condition matched, not proof of compromise or of prevention. Corroborate it with the audit log, the image digest and the workload owner before acting. To turn these into SIEM content, follow the detection content validation workflow.

Why This Is Not CI-Verified Here

This repository's other container labs run on GitHub-hosted runners with evidence committed from CI. Runtime sensors do not fit that model well:

  • They need host-kernel access (privileged mode or SYS_ADMIN, tracefs, /proc). Inside kind, the node containers share the runner's kernel, so a sensor would be observing the runner itself.
  • The runner kernel is not under the repository's control. The Ubuntu 24.04 and 26.04 runner images dated 2026-11-22 both list kernel 7.0.0-1020-azure, and the runner-images notice says ubuntu-latest moves to Ubuntu 26.04 in November 2026. Whether Falco's modern eBPF probe or Tetragon loads on that kernel, and how quickly, was not tested.
  • A test that only proves "an alert fired on a synthetic shell" says little about tuning on real workloads.

The k8s-admission lab states the same boundary: runtime, audit and encryption-at-rest controls are outside its scope. A future lab would need to record the kernel version, driver, sensor version and rule release with every result.


See also

Related Files


โฌ…๏ธ Back to Master Index | ๐ŸŽฏ Role Navigation | Legal Notice


๐Ÿ“„ Source: ContainerSecurity/container-runtime-detection.md | โœ๏ธ Suggest an edit | โฌ…๏ธ Back to Container Security

Clone this wiki locally