How would you detect a container escape or suspicious behaviour inside running containers?

AdvancedScenarioSecurity incidents
Answer

Situation read → Image scanning only covers what you shipped. Runtime detection watches what containers actually do: unexpected shells, writes to system paths, privilege changes.

What I'd do →

  1. Deploy Falco as a DaemonSet (eBPF driver) or enable GuardDuty EKS Runtime Monitoring.
  2. Start with high-signal rules: shell spawned in a container, write below /etc or /usr/bin, reading /etc/shadow, unexpected outbound connections, mounting the host filesystem.
- rule: Shell in production container
  condition: spawned_process and container and proc.name in (bash, sh) and k8s.ns.name = "prod"
  output: "Shell in container (user=%user.name pod=%k8s.pod.name cmd=%proc.cmdline)"
  priority: WARNING
  1. Route alerts with Falcosidekick to Slack and your SIEM; tune noisy rules for a couple of weeks.
  2. Reduce what's possible: read-only root filesystem, drop capabilities, seccomp, no host mounts, no privileged pods.
  3. Define the response: isolate the pod with a NetworkPolicy, snapshot, and replace the node.

Why → Prevention shrinks the attack surface; runtime detection catches what still gets through.

Interview tip → Mention tuning; untuned runtime alerts get ignored within a week.

All Real-World Interview questions Roadmap: Interview readiness

More on Security incidents