liveBook · Manning

Privilege escalation

As explained in Google Anthos in Action

Privilege escalation is the acquisition of permissions or capabilities beyond those initially granted to a process or workload.

Privilege escalation occurs when a container or workload gains permissions or capabilities beyond its initial grant. In Kubernetes, a container with the privileged flag can break out and affect the host as a superuser. section 13.3.2

Reduce the main escalation paths by:

  • Forcing containers to prevent privilege escalation. section 13.3.2
  • Preventing images from running as the root user by default; publicly available images may use root to avoid internal permission problems. section 13.3.2
  • Evaluating admission controls carefully: PodSecurityPolicy was deprecated starting in Kubernetes 1.21 and is removed in its current form in 1.25, while organizations often adopted Gatekeeper instead. section 13.3.2

How Google Anthos in Action covers it

How deep it goes
Explains privileged containers, root execution, and policy enforcement trade-offs, but stops short of configuration commands.
Examples
Uses host breakout through the privileged flag, root-based public images, and Gatekeeper as concrete security examples.
What it assumes
Assumes familiarity with containers, Pods, images, superusers, and Kubernetes policy objects.
What you can do after
Apply safeguards that prevent containers from escalating privileges or running as root by default.
How it connects
Connects privileged containers with root users, PodSecurityPolicy, admission controllers, and Gatekeeper.

Also explained in

Compare how 3 books explain privilege escalation →

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.