Security Architecture

A containerized web app was exploited through a remote code execution flaw. The team wants to limit what an attacker can write or escalate to inside the container. Which configuration BEST does this?

Show the answer

Correct answerA. Run as a non-root user with a read-only root filesystem and dropped capabilities

AWhy this is right: Least-privilege runtime settings block writes and privilege escalation after a compromise.

BWhy not this: Extra tools in the image give an attacker more to use and enlarge the attack surface.

CWhy not this: Privileged mode and a shared host PID namespace give an attacker far more access, not less.

DWhy not this: Exposing the runtime socket lets a compromised container control other containers and the host.

A non-root user, read-only root filesystem and dropped Linux capabilities remove the attacker's ability to install tools or escalate. Privileged mode does the opposite, giving a compromised container near-host-level access.