Kubernetes RBAC Misconfiguration
Что такое Kubernetes RBAC Misconfiguration?
Kubernetes RBAC MisconfigurationOver-permissive Kubernetes Role/ClusterRole bindings that grant workloads, users, or service accounts cluster-wide powers — verbs on Secrets, pods/exec, impersonate — turning a single compromised container into cluster takeover.
Kubernetes RBAC misconfiguration is consistently in the top three findings of every cluster audit. The common patterns are: binding workloads to cluster-admin or to ClusterRoles with verbs `*` on resources `*`; granting `get`, `list`, or `watch` on `secrets` cluster-wide (which lets a pod read every secret in the cluster); allowing `pods/exec` (which lets the holder shell into any pod, including the API server's static pods on misconfigured clusters); allowing `impersonate` on users, groups, or serviceaccounts (which is full account takeover); and binding the default service account in `kube-system` to admin. The blast radius pattern is consistent: a compromised front-door container with one of these bindings allows an attacker to dump all Secrets (including service-account tokens), exec into other pods, modify webhooks, or impersonate the admin group. Mitigations include automated linting (kubescape, kube-bench, Polaris, Datree), admission policies (Kyverno, OPA Gatekeeper) that reject overpermissive bindings, periodic generation of a least-privilege Role from runtime audit logs (rakkess, audit2rbac), and rolling out Pod Identity / Workload Identity rather than cluster-wide tokens.
● Примеры
- 01
A monitoring sidecar is bound to a ClusterRole granting `get` on `secrets` cluster-wide; a compromise of the sidecar lets the attacker dump every Secret in every namespace.
- 02
An admission policy rejects any RoleBinding that references the `cluster-admin` ClusterRole outside of the `kube-system` namespace.
● Частые вопросы
Что такое Kubernetes RBAC Misconfiguration?
Over-permissive Kubernetes Role/ClusterRole bindings that grant workloads, users, or service accounts cluster-wide powers — verbs on Secrets, pods/exec, impersonate — turning a single compromised container into cluster takeover. Относится к категории Облачная безопасность в кибербезопасности.
Что означает Kubernetes RBAC Misconfiguration?
Over-permissive Kubernetes Role/ClusterRole bindings that grant workloads, users, or service accounts cluster-wide powers — verbs on Secrets, pods/exec, impersonate — turning a single compromised container into cluster takeover.
Как работает Kubernetes RBAC Misconfiguration?
Kubernetes RBAC misconfiguration is consistently in the top three findings of every cluster audit. The common patterns are: binding workloads to cluster-admin or to ClusterRoles with verbs `*` on resources `*`; granting `get`, `list`, or `watch` on `secrets` cluster-wide (which lets a pod read every secret in the cluster); allowing `pods/exec` (which lets the holder shell into any pod, including the API server's static pods on misconfigured clusters); allowing `impersonate` on users, groups, or serviceaccounts (which is full account takeover); and binding the default service account in `kube-system` to admin. The blast radius pattern is consistent: a compromised front-door container with one of these bindings allows an attacker to dump all Secrets (including service-account tokens), exec into other pods, modify webhooks, or impersonate the admin group. Mitigations include automated linting (kubescape, kube-bench, Polaris, Datree), admission policies (Kyverno, OPA Gatekeeper) that reject overpermissive bindings, periodic generation of a least-privilege Role from runtime audit logs (rakkess, audit2rbac), and rolling out Pod Identity / Workload Identity rather than cluster-wide tokens.
Как защититься от Kubernetes RBAC Misconfiguration?
Защита от Kubernetes RBAC Misconfiguration обычно сочетает технические меры и операционные практики, как описано в определении выше.
Какие есть другие названия Kubernetes RBAC Misconfiguration?
Распространённые альтернативные названия: K8s RBAC misuse, Overprivileged ServiceAccount.
● Связанные термины
- cloud-security№ 671
Безопасность Kubernetes
Защита кластера Kubernetes — API-сервера, control plane, узлов, рабочих нагрузок и сети — от ошибок конфигурации, компрометации и латерального перемещения.
- cloud-security№ 668
Атака на кластер Kubernetes
Вторжение в кластер Kubernetes (K8s) с использованием открытых API, слабого RBAC или уязвимых нагрузок для захвата контроля над control plane или рабочими узлами.
- identity-access№ 955
Принцип наименьших привилегий
Принцип безопасности, согласно которому каждому пользователю, процессу или сервису выдаётся только тот минимум прав, который строго необходим для его задач.
- cloud-security№ 1124
Токен ServiceAccount (Kubernetes)
JWT-учётка, монтируемая в под Kubernetes, которая аутентифицирует нагрузку перед API-сервером и сторонними сервисами, доверяющими identity provider кластера.
- cloud-security№ 849
OPA Gatekeeper
OPA Gatekeeper — контроллер политик CNCF, использующий Open Policy Agent и язык Rego для применения политик допуска и аудита к ресурсам Kubernetes.
- cloud-security№ 673
Kyverno
Kyverno — CNCF-движок политик Kubernetes, который валидирует, изменяет и создаёт ресурсы по политикам, написанным на нативном YAML, а не на отдельном DSL.