Skip to content

Lesson 09 — Privilege Escalation

Privilege Escalation is one of the primary objectives of attackers after gaining an initial foothold inside a Kubernetes environment.

An attacker who compromises a low-privileged workload will rarely stop there. Instead, they attempt to obtain higher privileges that provide broader access to Kubernetes resources, worker nodes, cloud services, or sensitive business applications.

Fortunately, privilege escalation is often preventable through proper identity management, Role-Based Access Control (RBAC), workload hardening, and governance.

As a Cloud Penetration Tester, your objective is to identify conditions that could allow privilege escalation and assess whether enterprise security controls effectively limit unauthorized access.

This lesson focuses on recognizing privilege escalation risks, understanding their business impact, and evaluating Kubernetes authorization controls during professional security assessments.


After completing this lesson, you will be able to:

  • Understand privilege escalation in Kubernetes.
  • Identify common privilege escalation paths.
  • Review identity and authorization controls.
  • Assess Service Account permissions.
  • Evaluate workload configurations.
  • Identify enterprise security weaknesses.
  • Document privilege escalation risks.
  • Recommend security improvements.

CloudNova Technologies has been engaged to assess the Kubernetes environment of a large retail organization.

During the assessment, the consulting team discovers several workloads running with elevated permissions and multiple Service Accounts assigned excessive access across production namespaces.

Management wants to understand whether these configurations could allow an attacker to move beyond an initially compromised workload and gain administrative control of the Kubernetes environment.

Your responsibility is to evaluate privilege escalation opportunities and provide practical recommendations to reduce organizational risk.


Privilege escalation occurs when an identity gains permissions beyond those originally assigned.

In Kubernetes, this may involve moving from:

  • A low-privileged Pod
  • A standard Service Account
  • A developer account
  • A namespace administrator

to a more privileged identity such as:

  • Cluster Administrator
  • Control Plane Administrator
  • Cloud Administrator
  • Infrastructure Administrator

Once elevated privileges are obtained, attackers may be able to:

  • View sensitive workloads.
  • Access Kubernetes Secrets.
  • Modify Deployments.
  • Create privileged Pods.
  • Access worker nodes.
  • Change RBAC policies.
  • Deploy malicious workloads.
  • Pivot into cloud services.
  • Disrupt business operations.

Preventing privilege escalation significantly limits the impact of an initial compromise.


Enterprise Kubernetes assessments frequently identify:

Users or Service Accounts receive more permissions than required.


Applications inherit unnecessary administrative permissions.


Containers running with elevated privileges increase operational risk.


Improper host filesystem access can expose sensitive resources.


Unnecessary cluster-wide administrative permissions.


Development workloads gain access to production resources.


Missing or disabled admission controls allow insecure workloads.


Containers receive unnecessary operating system privileges.


Review Identities
Review RBAC
Review Service Accounts
Review Workload Security
Review Namespace Isolation
Review Administrative Roles
Review Runtime Security
Assess Business Risk
Document Findings

Review:

  • Users
  • Groups
  • Service Accounts
  • Administrative identities
  • External identities

Validate:

  • Business ownership
  • Access justification
  • Principle of Least Privilege

Assess:

  • Roles
  • ClusterRoles
  • RoleBindings
  • ClusterRoleBindings

Review for:

  • Wildcard permissions
  • Administrative roles
  • Unnecessary access
  • Inherited permissions

Review:

  • Assigned permissions
  • Namespace
  • Mounted API tokens
  • Application ownership
  • Cloud identity integration

Determine whether workloads have only the permissions necessary to perform their intended function.


Evaluate:

  • Production separation
  • Development isolation
  • Administrative namespaces
  • Shared workloads

Weak namespace isolation increases the likelihood of lateral movement and privilege escalation.


Review:

  • Security Context
  • Privileged containers
  • HostPath volumes
  • Host networking
  • Host PID
  • Host IPC
  • Linux Capabilities

These configurations should be limited to workloads with a clearly documented business requirement.


Review:

  • Cluster Administrators
  • Namespace Administrators
  • DevOps Teams
  • Platform Engineers
  • Automation Accounts

Validate:

  • Business justification
  • Approval process
  • Access reviews
  • Multi-factor authentication (where integrated)

Enterprise Kubernetes assessments commonly identify:

  • Cluster-admin assigned to development accounts
  • Over-permissioned Service Accounts
  • Privileged containers without justification
  • Weak namespace separation
  • Unused administrative accounts
  • Excessive ClusterRoleBindings
  • Missing access reviews
  • Shared Service Accounts
  • Inconsistent RBAC governance
  • Lack of privileged access monitoring

Organizations should:

  • Apply the Principle of Least Privilege.
  • Limit administrative accounts.
  • Regularly review RBAC assignments.
  • Restrict privileged containers.
  • Enforce Pod Security Admission.
  • Separate production and development workloads.
  • Review Service Account permissions.
  • Implement periodic access reviews.
  • Monitor privileged activity.

Professional Kubernetes security consultants should:

  • Begin with identity governance before reviewing workloads.
  • Document every privileged identity.
  • Review Service Accounts separately from user accounts.
  • Validate namespace boundaries.
  • Prioritize findings according to business impact.
  • Support every observation with evidence.
  • Recommend realistic remediation steps.
  • Align recommendations with organizational governance policies.

  • Privilege escalation significantly increases the impact of an initial compromise.
  • RBAC, Service Accounts, and workload configuration are primary areas of concern.
  • Least Privilege remains the most effective defense against unauthorized privilege escalation.
  • Namespace isolation and workload hardening reduce lateral movement opportunities.
  • Enterprise Kubernetes assessments should evaluate privilege escalation from both technical and governance perspectives.

In this lesson, you learned how privilege escalation occurs within Kubernetes environments, the most common authorization and workload configuration weaknesses, and how Cloud Penetration Testers assess privilege escalation risks during enterprise engagements.

Understanding these risks enables organizations to strengthen identity governance, improve workload security, and reduce the likelihood of unauthorized administrative access.


➡️ Lesson 10 — Persistence

In the next lesson, you will learn how attackers attempt to maintain long-term access within Kubernetes environments, how consultants assess persistence mechanisms, and how organizations can strengthen monitoring, identity governance, and workload security to detect and prevent unauthorized persistence.