Impact & Risk Analysis
- Severity: Medium (Level 2 - Defense in Depth)
- CIS Benchmark: CIS 5.2.9
- Impact: Reduced Attack Surface. Linux Capabilities break down the “root” privilege into smaller units (like
CHOWN,KILL,NET_BIND_SERVICE). Default container runtimes grant a set of default capabilities that are unnecessary for most web applications. If an attacker compromises a container, they can use these capabilities to manipulate files, processes, or network settings. Dropping all capabilities ensures the process has the absolute minimum rights required to run.
Common Misconfiguration
Running containers with the default capability set provided by the container runtime (e.g., Docker default includesCHOWN, DAC_OVERRIDE, FOWNER, MKNOD, NET_RAW, etc.).
Vulnerable Example
Secure Example
Audit Procedure
List the policies in use or inspect running pods to ensure that capabilities are explicitly dropped. Check Running Pods:- Analyze: Look for
ALL. - Fail: If the output is empty or does not contain
ALL.
drop: ["ALL"]).
Remediation
- Update Application Manifests: Modify your Deployment YAMLs to explicitly drop all capabilities.
- Enforce Policy: Apply the restricted Pod Security Standard to your namespaces.
NET_BIND_SERVICE to bind to port 80), you should drop ALL first and then explicitly add back only that single capability.
