Interview Prep/Docker/Security and scanning

A pentester got root inside a container. How bad is it?

AdvancedScenarioSecurity and scanning
Answer

Situation read → Depends on isolation settings.

What I'd do → Check: is it privileged? docker.sock mounted? host PID/net namespace? sensitive host paths bind-mounted? dangerous capabilities (SYS_ADMIN, SYS_MODULE)? kernel version (container escapes like runc CVEs)? If none, root in the container is still uid 0 mapped to host root unless userns is on, but confined by namespaces, cgroups, seccomp and capabilities.

Why → Container root is not host root only because of those layers.

Interview tip → Use capsh --print and cat /proc/self/status | grep Cap inside to assess.

All Docker questions Roadmap: Docker & containers

More on Security and scanning