liveBook · Manning

Container breakout

As explained in Google Anthos in Action

A container breakout is an escape from a container's isolation that enables access to the host system or resources outside the container.

A container breakout escapes container isolation and reaches the host system or resources outside the container. Shared host kernels create an attack path, while a successful breakout may expose the host operating system and other workloads. section 13.2

Assess breakout impact through the container's runtime identity and privileges:

  • Running as root alone does not grant host-root access; the container runtime and privileged setting determine host permissions. section 13.6
  • A root container with privileged mode can receive root access to the host, making host takeover possible after a breakout. section 13.6 section 13.6.1
  • Reduce impact by applying least privilege and running applications as nonroot users whenever possible. section 13.6.1

Run a Pod as a nonroot user

A Pod can use securityContext to set runAsUser to 1500, runAsGroup to 1000, and fsGroup to 1200. Commands such as whoami and groups verify the effective identity and group membership. section 13.6.1

Table 13.3 Root and privileged container permissions (view table figure)

Running container user

Privileged value

Host permissions

Running as root

False

None

Running as root

True

Root access

Running as nonroot

False

None

Running as nonroot

True

Limited; only permissions that have been granted to the same user on the host system

Compare running users and privileged settings with their resulting host permissions. section 13.6

How Google Anthos in Action covers it

How deep it goes
Explains shared-kernel risk, permission outcomes, and nonroot configuration, but does not detail breakout exploit techniques.
Examples
Uses root and privileged permission combinations plus a Pod securityContext setting user, group, and fsGroup IDs.
What it assumes
Assumes basic containers and Kubernetes knowledge while teaching the effects of runtime user identity and privileged mode.
What you can do after
Operate/configure containers with nonroot identities and evaluate how privileged settings affect host exposure.
How it connects
Connects container breakout with container runtimes, virtual machines, hypervisors, privileged containers, and least privilege.

Also explained in

Compare how 2 books explain container breakout →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.