WAF-SEC-120 – Container & Runtime Security
Beschreibung
Container DÜRFEN NICHT im Privileged Mode (privileged: true) betrieben werden.
Container SOLLEN NICHT als Root (UID 0) laufen – Non-Root-Ausführung MUSS für alle
Produktions-Workloads konfiguriert sein. EKS-Cluster MÜSSEN Secrets-Encryption mit einem
KMS-CMK konfiguriert haben. Resource Limits (CPU und Memory) MÜSSEN für alle Container
in Produktionsumgebungen definiert sein. Der EKS-API-Server-Endpoint SOLLTE nicht öffentlich
zugänglich sein (privater Endpoint bevorzugt).
Rationale
Container, die als Root laufen, haben bei einem Container-Escape-Exploit dieselben Rechte wie der Host-Root – was eine sofortige Host-Kompromittierung bedeutet. Privilegierte Container haben nahezu uneingeschränkten Zugriff auf den Host-Kernel und alle Geräte. EKS Kubernetes-Secrets werden standardmäßig unverschlüsselt in etcd gespeichert; ohne CMK-Encryption sind Secrets (Service-Account-Tokens, TLS-Zertifikate, Applikations-Secrets) im Klartext im etcd lesbar. Resource Limits verhindern, dass ein kompromittierter Container alle Host-Ressourcen belegt und damit einen Denial-of-Service verursacht.
Bedrohungskontext
| Risiko | Beschreibung |
|---|---|
Container Escape zu Root |
Ein als Root laufender Container kann bei einem Kernel-Exploit direkt Host-Root-Zugriff erlangen. |
Privileged Container als Backdoor |
Privilegierte Container können Kernel-Module laden, Geräte mounten und damit den gesamten Host kompromittieren. |
Unverschlüsselte Kubernetes-Secrets |
Ohne etcd-Verschlüsselung sind alle Kubernetes-Secrets im Klartext im Cluster-Backup oder für Cluster-Admins lesbar. |
Resource Exhaustion durch kompromittierte Workloads |
Cryptominer oder Denial-of-Service aus einem kompromittierten Container beanspruchen alle verfügbaren Ressourcen. |
Anforderung
-
Alle EKS-Cluster MÜSSEN
encryption_configmit einer KMS-CMK fürresources = ["secrets"]konfiguriert haben. -
Container in Produktionsumgebungen DÜRFEN NICHT mit
privileged = truelaufen. -
Container MÜSSEN als Non-Root-User konfiguriert sein (z. B.
user = "1000:1000"in ECS Task Definitions). -
Resource Limits (CPU/Memory) MÜSSEN für alle Produktions-Container definiert sein.
-
EKS-Control-Plane-Logging MUSS für
api,audit,authenticatoraktiviert sein.
Implementierungsanleitung
-
EKS Secrets Encryption:
encryption_config { resources = ["secrets"] provider { key_arn = aws_kms_key.eks.arn } }imaws_eks_clusterkonfigurieren. -
EKS Logging aktivieren:
enabled_cluster_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"]. -
Non-Root-User in ECS:
user = "1000:1000"in der Container-Definition deraws_ecs_task_definitionsetzen. -
No Privileged Mode:
privileged = falseexplizit setzen; in Kubernetes:securityContext.privileged: false. -
Resource Limits:
memoryundcpuin ECS Task Definition oder Kubernetesresources.limitsundresources.requests. -
Pod Security Standards: Kubernetes Admission Controller für
restrictedoder mindestensbaselinePSS konfigurieren. -
Runtime Security: GuardDuty Runtime Monitoring oder Falco für laufzeitbasierte Anomalie-Erkennung aktivieren.
Reifegrad-Abstufung
| Level | Bezeichnung | Kriterien |
|---|---|---|
1 |
Keine Container-Sicherheitsstandards |
Container laufen als Root; kein Privileged-Mode-Schutz; keine Resource Limits; EKS-Secrets unverschlüsselt. |
2 |
Grundlegende Härtung für einige Workloads |
Resource Limits für kritische Workloads; einige Container mit Non-Root-User; EKS-Logging teilweise aktiv. |
3 |
Erzwungene Non-Root-Ausführung; EKS verschlüsselt |
EKS Secrets CMK-Encryption; Non-Root für alle Produktions-Container; kein Privileged Mode; Resource Limits überall definiert. |
4 |
Pod Security Standards enforced; Runtime Monitoring |
Kubernetes PSS |
5 |
Zero-Trust Container-Netzwerk mit eBPF Security |
Service Mesh mit mTLS für alle East-West-Traffic; eBPF-basiertes Runtime Security; vollständige Workload-Identität. |
Terraform Checks
waf-sec-120.tf.aws.eks-secrets-encryption
Prüft: EKS-Cluster müssen Secrets-Encryption mit KMS-CMK konfiguriert haben.
| Compliant | Non-Compliant |
|---|---|
|
|
Remediation: encryption_config-Block mit CMK-ARN und resources = ["secrets"] zum aws_eks_cluster hinzufügen. Kann nur beim Cluster-Erstellen oder nachträglich über ein Cluster-Update gesetzt werden.
Evidenz
| Typ | Pflicht | Beschreibung |
|---|---|---|
IaC |
✅ Pflicht |
Terraform-Konfiguration des |
Config |
✅ Pflicht |
ECS Task Definition oder Kubernetes Deployment-Manifeste ohne |
Config |
Optional |
Pod Security Admission Controller Konfiguration mit |
Process |
Optional |
GuardDuty Runtime Monitoring Aktivierungs-Screenshot oder Falco-Deployment-Konfiguration. |
Regulatorisches Mapping
| Framework | Controls |
|---|---|
ISO 27001:2022 |
A.5.15 – Threat intelligence; A.5.16 – Threat classification; A.5.24 – Information security incident management; A.5.25 – Assessment and decision on information security events; A.5.26 – Response to information security incidents; A.5.27 – Learning from information security incidents; A.8.2 – Privileged access rights; A.8.5 – Secure authentication; A.8.8 – Management of technical vulnerabilities; A.8.10 – Information deletion; A.8.11 – Data masking; A.8.22 – Segregation of networks; A.8.23 – Network security; A.8.24 – Use of cryptography |
ISO 27017 |
CLD.5.1 – Information security in cloud services; CLD.5.2 – Access control in cloud services; CLD.6.3 – Shared roles and responsibilities |
ISO 27018 |
A.2 – Purpose legitimacy and PII protection; A.10 – Confidentiality and security of PII |
GDPR |
Art. 5(1)(c) – Data minimisation; Art. 5(1)(f) – Integrity and confidentiality; Art. 9 – Special categories of personal data; Art. 25 – Data protection by design and by default; Art. 32 – Security of processing; Art. 44 – General principles for transfers; Art. 46 – Appropriate safeguards; Art. 30 – Records of processing activities |
BSI C5:2020 |
IDM-01 – Identity and access management policy; IDM-02 – Role management; IDM-03 – User lifecycle management; COM-01 – Network and service security; COM-02 – Cloud monitoring; COM-03 – Cloud logging |
EUCS (ENISA) |
IAM-01 – Identity and access management; IAM-02 – Access rights management; IAM-03 – Privileged access management; IAM-04 – Access control policy |
NIST SP 800-53 |
AC-1 – Policy and procedures; AC-2 – Account management; AC-3 – Access enforcement; AC-6 – Least privilege; IA-2 – Identification and authentication; IA-5 – Authenticator management; SI-4 – Information system monitoring; SI-5 – Malicious code protection |
FedRAMP |
AC-1, AC-2, AC-3, AC-6, IA-2, IA-5, SI-4, SI-5 (Moderate/High baseline) |
HIPAA |
§ 164.308(a)(4) – Access management; § 164.312(a) – Access control; § 164.312(d) – Information system activity review; § 164.312(e)(1) – Transmission security |
PCI DSS v4.0 |
Req 7 – Restrict access to cardholder data; Req 8 – Identify and authenticate access; Req 8.3 – Non-service accounts; Req 8.6 – Password policy; Req 8.2.4 – MFA |
SOC 2 Type II |
CC6.1 – Logical access security software; CC6.2 – Logical access security management; CC6.6 – Secure configuration; CC6.7 – Network security |
CSRD |
ESRS E1 – Climate change – Disclosure of information; ESRS G1 – Governance – Disclosure of information |
NIST CSF 2.0 |
GV.AC – Identity management and access control; DE.CM – Configuration management; DE.AE – Anomaly detection |
CIS Controls v8 |
CIS 4 – Secure Configuration; CIS 4.1 – Inventory and control of enterprise assets; CIS 4.4 – Access control; CIS 4.5 – Least privilege; CIS 4.8 – Audit log management |
TISAX |
Information security – Access rights management; Prototype protection – Sensitive data handling |
ANSSI SecNumCloud |
Domain – Identity and access management; Domain – Security monitoring |
BIO |
BIO – Identificatie en authenticatie; BIO – Toegangsbeheer |
ENS High |
org.3 – Políticas de acceso; op.exp.5 – Monitorización de la configuración |
UK NCSC CAF |
B1 – Access control; B2 – Secure configuration |
CMMC 2.0 |
AC.L2-3.1.1 – Access control policy; AC.L2-3.5.1 – Access enforcement |
IRAP |
ISM – Identity and access management; ISM – Access control |
CCCS PBMM |
AC-6 – Least privilege; AC-7 – Unsuccessful logon attempts |
MAS TRM |
Ch.4 – Identity and access management; Ch.8 – Security monitoring |
ISMAP |
Access control and identity management |
FISC |
Operational measures – Access control |