Ensure that the admission control plugin DenyEscalatingExec is set (API Server)
Deny execution of exec and attach commands in privileged pods. Setting admission control policy to DenyEscalatingExec denies exec and attach commands to pods that run with escalated privileges that allow host access. This includes pods that run as privileged, have access to the host IPC namespace, and have access to the host PID namespace.
Risk Level: High
Cloud Entity: Pods
CloudGuard Rule ID: D9.K8S.NET.19
Covered by Spectral: Yes
Category: Compute
GSL LOGIC
KubernetesPod where labels contain [value='kube-apiserver'] and namespace = 'kube-system' should have spec.containers with [parsedArgs contain [key like 'enable-admission-plugins' and value like '%DenyEscalatingExec%']]
REMEDIATION
Edit the API server pod specification file $apiserverconf
on the master node and set the --enable-admission-plugins parameter to a
value that includes DenyEscalatingExec.
--enable-admission-plugins=...,DenyEscalatingExec,...
Pods
Pods are the smallest deployable units of computing that can be created and managed in Kubernetes.A Pod is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers.
Compliance Frameworks
- CIS Kubernetes Benchmark v1.4.0
- Kubernetes NIST.SP.800-190
- Kubernetes v.1.13 CloudGuard Best Practices
- Kubernetes v.1.14 CloudGuard Best Practices
Updated about 1 year ago