Prerequisites
- Target system, dependencies and environment configured.
Usage
Purpose
Scanning images and enforcing policy at deploy time keeps a lot of bad things out — but it can't catch what happens after a container starts: an exploited application, a container escape attempt, crypto-mining, or an attacker's post-compromise activity. Runtime threat detection watches running containers for malicious behaviour, providing the detection layer that build-time and deploy-time controls can't. This skill covers runtime monitoring for containers and Kubernetes, closing the gap after the container is live.
When to use it
As the runtime layer of container security, complementing image scanning (build), admission control (deploy), and hardening (config). It's what detects the compromise that gets through those — because prevention is never perfect, you need detection for running workloads.
Procedure
- Understand what runtime detection adds. Build/deploy controls are preventive and static; runtime detection is behavioural and live. It catches: an application exploited at runtime, a container escape attempt, unexpected process execution (a shell spawned in a container that shouldn't have one), crypto-mining, connections to C2, and file/privilege changes — activity that only exists once the container runs.
- Deploy a runtime security tool. Falco (the CNCF standard, using kernel-level syscall monitoring) or eBPF-based tools (Tetragon, Cilium) observe container behaviour at the kernel level and alert on suspicious activity. These see what containers actually do, not just what they were configured to do.
- Detect the high-value behaviours:
- Shell/unexpected process in a container — a shell spawned in a container that should only run its app is a strong compromise signal (containers are usually single-purpose).
- Container escape attempts — the escape vectors in action (privileged operations, sensitive mounts accessed, host namespace access).
- Crypto-mining — high CPU plus mining-pool connections; a very common container compromise outcome.
- Unexpected network connections — a container connecting to C2 or scanning internally.
- File and privilege changes — writes to sensitive paths, privilege escalation, package installs at runtime.
- Baseline expected behaviour. Containers are typically single-purpose and predictable, which makes anomaly detection more tractable than on general-purpose hosts — a container's normal behaviour is narrow, so deviation stands out. Baseline what each workload normally does.
- Tune to reduce noise. Runtime tools can be noisy (legitimate but unusual activity); tune rules to your workloads, using the same false-positive discipline as detection engineering. Untuned runtime alerts get ignored.
- Wire alerts into the SOC and response. Runtime detections feed the SOC (triage) and IR; a confirmed container compromise needs response (isolate the pod, investigate, eradicate). Detection without response is incomplete.
- Combine with the preventive controls. Runtime detection is the backstop, not a replacement — a compromise it catches should also prompt fixing the preventive gap (the image vuln, the missing policy) that let it happen.
Cheatsheet
build scan + deploy admission = PREVENTIVE/static. can't catch what happens AFTER start.
runtime detection = BEHAVIOURAL/live — the detection layer for RUNNING containers
tools: Falco (CNCF, syscall/kernel-level) | Tetragon/Cilium (eBPF)
-> see what containers actually DO, not just their config
high-value runtime behaviours
SHELL / unexpected process in a container strong compromise signal (containers = single-purpose)
container ESCAPE attempts privileged ops, sensitive mounts, host namespace
CRYPTO-MINING high CPU + mining-pool connections (common outcome)
unexpected NETWORK (C2, internal scanning)
FILE/PRIVILEGE changes sensitive writes, priv-esc, runtime package installs
BASELINE: containers are single-purpose + predictable -> anomaly detection tractable (deviation stands out)
TUNE noise (detection-engineering discipline) ; wire to SOC + IR (detection needs response)
backstop, not replacement -> also fix the preventive gap that let it in
Reading the detections
- A shell spawned inside a container that only runs an app = one of the strongest container-compromise signals; containers are single-purpose, so an interactive shell is almost always an attacker or an exploited process. High-value detection.
- Container escape-attempt behaviour (privileged operations, sensitive mounts accessed, host namespace access at runtime) = an active attempt to break out to the node; escalate immediately and fix the config that allowed it.
- Crypto-mining signals (sustained high CPU + mining-pool connections) = a very common container compromise outcome; often the first visible sign that a container was popped.
- Unexpected outbound connections = C2 or internal scanning from a compromised container; the network behaviour betrays the compromise even if the process looks normal.
- Runtime alerts that are noisy = need tuning to the workload; untuned runtime detection gets ignored like any noisy detection. Apply false-positive discipline.
- A runtime detection with no response path = incomplete; a caught compromise needs isolation, investigation, and eradication. Wire it to IR.
- Baselined, tuned runtime detection feeding the SOC, backing up preventive controls = the complete picture — prevention plus detection for what gets through.
Pitfalls
- Relying only on build/deploy controls. They're preventive and can't catch runtime compromise (exploited apps, escapes, mining). Prevention isn't perfect; you need runtime detection for what gets through.
- No runtime monitoring. A compromised running container is invisible without it; escapes and mining proceed unseen. Deploy Falco or an eBPF tool.
- Untuned runtime alerts. They're noisy and get ignored; tune to your workloads with false-positive discipline.
- Detection without response. A runtime alert that doesn't trigger investigation and containment is wasted; wire it to the SOC and IR.
- Treating detection as a substitute for prevention. It's a backstop — also fix the preventive gap (image vuln, missing policy, escape vector) that allowed the compromise.
- Ignoring the single-purpose advantage. Containers' predictability makes anomaly detection more effective than on general hosts; baseline and exploit that.
References
- Falco (falco.org, CNCF) and Tetragon/Cilium eBPF documentation
- The container-image-scanning, admission-control, and container-escape-vectors skills
- The detection-engineering and SOC domains (tuning, triage, response)
- MITRE ATT&CK for Containers
Inputs
- Relevant source code, logs, network traces, or system specifications.
Outputs
- Analysis findings, security audit report, or generated code artifacts.
1---2name: runtime-threat-detection3description: Use when detecting malicious behaviour in running containers — the runtime monitoring that catches escapes, crypto-mining, and anomalous activity that build-time controls can't.4---5678## Prerequisites9- Target system, dependencies and environment configured.1011## Usage12### Purpose1314Scanning images and enforcing policy at deploy time keeps a lot of bad things out — but it can't catch what happens *after* a container starts: an exploited application, a container escape attempt, crypto-mining, or an attacker's post-compromise activity. Runtime threat detection watches running containers for malicious behaviour, providing the detection layer that build-time and deploy-time controls can't. This skill covers runtime monitoring for containers and Kubernetes, closing the gap after the container is live.1516### When to use it1718As the runtime layer of container security, complementing image scanning (build), admission control (deploy), and hardening (config). It's what detects the compromise that gets through those — because prevention is never perfect, you need detection for running workloads.1920### Procedure21221. **Understand what runtime detection adds.** Build/deploy controls are preventive and static; runtime detection is behavioural and live. It catches: an application exploited at runtime, a container escape attempt, unexpected process execution (a shell spawned in a container that shouldn't have one), crypto-mining, connections to C2, and file/privilege changes — activity that only exists once the container runs.232. **Deploy a runtime security tool.** Falco (the CNCF standard, using kernel-level syscall monitoring) or eBPF-based tools (Tetragon, Cilium) observe container behaviour at the kernel level and alert on suspicious activity. These see what containers actually do, not just what they were configured to do.243. **Detect the high-value behaviours:**25 - **Shell/unexpected process in a container** — a shell spawned in a container that should only run its app is a strong compromise signal (containers are usually single-purpose).26 - **Container escape attempts** — the escape vectors in action (privileged operations, sensitive mounts accessed, host namespace access).27 - **Crypto-mining** — high CPU plus mining-pool connections; a very common container compromise outcome.28 - **Unexpected network connections** — a container connecting to C2 or scanning internally.29 - **File and privilege changes** — writes to sensitive paths, privilege escalation, package installs at runtime.304. **Baseline expected behaviour.** Containers are typically single-purpose and predictable, which makes anomaly detection more tractable than on general-purpose hosts — a container's normal behaviour is narrow, so deviation stands out. Baseline what each workload normally does.315. **Tune to reduce noise.** Runtime tools can be noisy (legitimate but unusual activity); tune rules to your workloads, using the same false-positive discipline as detection engineering. Untuned runtime alerts get ignored.326. **Wire alerts into the SOC and response.** Runtime detections feed the SOC (triage) and IR; a confirmed container compromise needs response (isolate the pod, investigate, eradicate). Detection without response is incomplete.337. **Combine with the preventive controls.** Runtime detection is the backstop, not a replacement — a compromise it catches should also prompt fixing the preventive gap (the image vuln, the missing policy) that let it happen.3435### Cheatsheet3637```38build scan + deploy admission = PREVENTIVE/static. can't catch what happens AFTER start.39 runtime detection = BEHAVIOURAL/live — the detection layer for RUNNING containers4041tools: Falco (CNCF, syscall/kernel-level) | Tetragon/Cilium (eBPF)42 -> see what containers actually DO, not just their config4344high-value runtime behaviours45 SHELL / unexpected process in a container strong compromise signal (containers = single-purpose)46 container ESCAPE attempts privileged ops, sensitive mounts, host namespace47 CRYPTO-MINING high CPU + mining-pool connections (common outcome)48 unexpected NETWORK (C2, internal scanning)49 FILE/PRIVILEGE changes sensitive writes, priv-esc, runtime package installs5051BASELINE: containers are single-purpose + predictable -> anomaly detection tractable (deviation stands out)52TUNE noise (detection-engineering discipline) ; wire to SOC + IR (detection needs response)53backstop, not replacement -> also fix the preventive gap that let it in54```5556### Reading the detections5758- **A shell spawned inside a container that only runs an app** = one of the strongest container-compromise signals; containers are single-purpose, so an interactive shell is almost always an attacker or an exploited process. High-value detection.59- **Container escape-attempt behaviour** (privileged operations, sensitive mounts accessed, host namespace access at runtime) = an active attempt to break out to the node; escalate immediately and fix the config that allowed it.60- **Crypto-mining signals** (sustained high CPU + mining-pool connections) = a very common container compromise outcome; often the first visible sign that a container was popped.61- **Unexpected outbound connections** = C2 or internal scanning from a compromised container; the network behaviour betrays the compromise even if the process looks normal.62- **Runtime alerts that are noisy** = need tuning to the workload; untuned runtime detection gets ignored like any noisy detection. Apply false-positive discipline.63- **A runtime detection with no response path** = incomplete; a caught compromise needs isolation, investigation, and eradication. Wire it to IR.64- **Baselined, tuned runtime detection feeding the SOC, backing up preventive controls** = the complete picture — prevention plus detection for what gets through.6566### Pitfalls6768- **Relying only on build/deploy controls.** They're preventive and can't catch runtime compromise (exploited apps, escapes, mining). Prevention isn't perfect; you need runtime detection for what gets through.69- **No runtime monitoring.** A compromised running container is invisible without it; escapes and mining proceed unseen. Deploy Falco or an eBPF tool.70- **Untuned runtime alerts.** They're noisy and get ignored; tune to your workloads with false-positive discipline.71- **Detection without response.** A runtime alert that doesn't trigger investigation and containment is wasted; wire it to the SOC and IR.72- **Treating detection as a substitute for prevention.** It's a backstop — also fix the preventive gap (image vuln, missing policy, escape vector) that allowed the compromise.73- **Ignoring the single-purpose advantage.** Containers' predictability makes anomaly detection more effective than on general hosts; baseline and exploit that.7475### References7677- Falco (falco.org, CNCF) and Tetragon/Cilium eBPF documentation78- The container-image-scanning, admission-control, and container-escape-vectors skills79- The detection-engineering and SOC domains (tuning, triage, response)80- MITRE ATT&CK for Containers8182## Inputs83- Relevant source code, logs, network traces, or system specifications.8485## Outputs86- Analysis findings, security audit report, or generated code artifacts.