Runtime detection check · Kubernetes runtime

Interactive shell started in a container

A shell (sh, bash, zsh and similar) attached to a terminal started inside a running container.

Why it matters

A production container runs one program; a person typing commands in it is either debugging by hand or an attacker who got in through the application, and either way it is a change nobody reviewed.

How to fix it

Find out who opened it (the parent process and user are in the event). If it was not a known debugging session, treat the workload as compromised: rotate its credentials and redeploy it from its image. Use ephemeral debug containers instead of exec for debugging.

What TrustIvan reads

The Falco rule "TrustIvan Shell in container" (MITRE ATT&CK execution, T1059), installed on every node by the trustivan-runtime Helm chart. Only where the chart is installed. Every rule validated with falco -V and fired against Falco 0.45.2 under Docker; the chart installed and three rules fired in a single-node k3d cluster.

References

Terms: Runtime threat detection, KSPM (Kubernetes security posture management), Code to cloud

All runtime detection checks · The whole catalogue · How this works in TrustIvan · Documentation

See TrustIvan on your own estate.

Book thirty minutes with an engineer and bring an image, a repository or a cloud account, or start free on the hosted service.