Quick answer

Inside a Docker container, LinPEAS detects the container context and looks for breakout conditions: a mounted Docker socket, the --privileged flag, dangerous capabilities (like CAP_SYS_ADMIN), sensitive host mounts and shared host namespaces.

What LinPEAS flags in a container#

  • A mounted /var/run/docker.sock — often a one-step breakout to host root.
  • --privileged mode and dangerous effective capabilities.
  • Host filesystem paths mounted into the container.
  • Mounted service-account tokens (also relevant in Kubernetes).

Verify it yourself#

Reproduce container/breakout checks
cat /proc/1/cgroup
ls -la /.dockerenv /var/run/docker.sock 2>/dev/null
cat /proc/self/status | grep CapEff

Read the concepts behind this: containers and namespaces.

Sources & references

  1. linPEAS README
  2. PEASS-ng release — reviewed 20260908-dffb9496
  3. HackTricks: Linux privilege escalation