Get the latest, first
Kubernetes security compliance frameworks

Kubernetes security compliance frameworks

Aug 1, 2023

Jonathan Kaftzan
VP Marketing & Business Development

This post compares popular Kubernetes security and compliance frameworks, how they differ, when to use them, common goals, and suggested tools.

The challenge of administering security and maintaining compliance in a Kubernetes ecosystem is typically the same: an increasingly dynamic, ever-changing, ephemeral landscape. Changes can be rooted in new approaches to cyberattacks or changing regulations.

Kubernetes security requires a complex and multifaceted approach since an effective strategy needs to:

  • Ensure clean code
  • Provide full observability
  • Prevent the exchange of information with untrusted services
  • Produce digital signatures for clean code and trusted applications

Security and compliance are two closely related concepts in Kubernetes. Security refers to the measures taken to protect a Kubernetes environment from unauthorized access, data breaches, and other malicious attacks. Compliance refers to the adherence to a set of security standards or regulations. While organizations may choose how they administer security, regulatory bodies are the ones who set and enforce mandatory compliance standards. These standards are designed to protect sensitive data and ensure the security of crtical infrastructure. By adhering to these regulations, organizations signal to customers that they care about ensuring business continuity and determining an application’s level of risk. This can also enhance an organization’s reputation, as a by product.

To help with this, various institutions offer standardized frameworks and guidelines for administering security in the complex and dynamic Kubernetes ecosystem. This post reviews popular Kubernetes security guidance frameworks, the principles on which they are built, and the benefits and challenges of adopting them.

By Security standards, at DevOps pace.

Actionable, contextual, <br/> end-to-end <br/> Kubernetes-native security

Kubernetes security guidance frameworks

Since Kubernetes follows a loosely coupled architecture, securing the ecosystem involves a combination of best practices, tools, and processes. It is also recommended to consider frameworks that issue specific guidelines for easing the complexity of administering the security and compliance of a Kubernetes ecosystem. Such frameworks help organizations create flexible, iterative, and cost-efficient approaches to keeping clusters and applications safe and compliant while ensuring optimum performance.

A typical framework’s guidance on Kubernetes security and compliance should essentially consider:

The foundations of these frameworks are built upon real-world observations. As a result, organizations referring to them remain up-to-date with the changing threat landscape—without losing focus on core organizational goals.

List of security guidance frameworks

As more data-driven applications go cloud-native, organizations are driven to pay more attention to security in order to protect their assets and information. To deal with this, every vendor or organization often develops and adopts its own security practices. While that’s a justifiable approach, it is susceptible to missing things in the changing threat landscape and leaving things unaccounted for. On the other hand, using frameworks for guidance, enables organizations to adhere to the expected security standards. This enables monitoring of security controls, enhanced team-level accountability, and efficient vulnerability assessment.

Additionally, organizations will often need to comply with respective industry standards as part of their regulatory obligations. Examples for this are: HIPAA for healthcare and PCI DSS for finance. While there are a number of frameworks that offer security guidelines for a cloud-native environment, the following are some of the most popular frameworks that offer focused guidance on securing Kubernetes workloads. All of these frameworks are free to use, offered by reputable (and objective) organizations, and have been created based on real-world events and the changing security landscape.

The Center for Internet Security (CIS) Kubernetes Benchmark

Since the mid-2000s, the Center for Internet Security (CIS) has been working closely with the IT community and publishing security benchmarks and best practices. CIS Benchmarks offer precise configuration recommendations that serve as guidance for many technologies, including operating systems, cloud services, network devices, and more. In the case of Kubernetes, these benchmarks offer a comprehensive guide for hardening Kubernetes environments. They outline recommendations for configuring cluster components securely. CIS also lists tools that can automatically check cluster resources to see if they comply with the set benchmarks and raise alerts for non-compliant components. As of 2020 the Center for Internet Security has rolled out a sub-set of benchmarks aimed specifically at cloud managed Kubernetes distributions. Starting with EKS, following with AKS and others.

Leveraging CIS Benchmarks for Kubernetes security

Securing clusters starts with identifying the Kubernetes distribution and referring to the related best practice recommendations. The best practices are then prioritized according to recommendation level:

  • Level 1: These recommendations are considered the minimum security measures recommended. They typically focus on essential security configurations that provide a baseline level of security.
  • Level 2: These settings usually involve stricter configurations and additional security measures beyond the baseline established by Level 1.

Recommendations are scored based on how much a failure to comply will affect the final benchmark score. The security team then outlines the values that specify the status of the recommendations in production.

Benefits and drawbacks

Some benefits of the CIS Benchmark for Kubernetes include:

  • Enhanced security measures and improved overall system reliability.
  • Consistent configuration across different environments, making it easier to manage and troubleshoot issues when they arise.
  • Promoting industry standards and collaboration among users by providing a common framework for evaluating Kubernetes security configurations

However, one of the primary concerns with this benchmark is its rigidity. The CIS benchmarks are designed to provide a one-size-fits-all approach to security, but Kubernetes environments can vary greatly in their architecture and requirements. This inflexibility can lead to unnecessary restrictions or limitations that may hinder the efficiency and functionality of an organization’s specific deployment. Additionally, keeping up with the frequent updates and changes in the CIS benchmark can be challenging for organizations already struggling with limited resources and time constraints. Furthermore, blindly adhering to these benchmarks may give a false sense of security, as they cannot account for every possible misconfiguration or threat scenario.

CIS security guidance – how to use

CIS Security Benchmarks are globally acknowledged security standards for defending web applications. CIS also offers tools, such as CIS-CAT, that enable security teams to compare system configurations with CIS standards. Kubescape is also a popular open-source tool for running CIS benchmark tests on Kubernetes workloads.

The MITRE ATT&CK® Framework for Kubernetes

The MITRE ATT&CK framework is a comprehensive knowledge base built on various hacking mechanisms and tactics based on real-world events. The framework forms the foundation for an organization’s threat model by simulating adversary behavior and mitigation practices. While MITRE outlines various matrices for niche domains, such as Cloud, Windows, etc., the Kubernetes framework focuses on various phases of an attack lifecycle exploiting Kubernetes platforms.

The MITRE ATT&CK Matrix for Kubernetes

MITRE ATT&CK (Adversarial Tactics, Techniques & Common Knowledge) outlines various attack mechanisms commonly leveraged by attack vectors in a Kubernetes ecosystem, including:

  • Initial Access – Techniques that can be exploited to enable first access to the cluster, e.g.:
  • Weak cloud credentials
  • Compromised registry images
  • Kubeconfig
  • Vulnerable applications
  • Exposed Kubernetes dashboard
  • Execution – Typically involves running malicious code inside the cluster using tactics, e.g.: 
  • Executing into a container
  • Building a new container
  • Application exploit
  • Running an SSH Server inside the container
  • Persistence – Tactics to keep accessing the cluster even when hackers lose their initial foothold, e.g.:
  • Exploiting a backdoor container
  • Writeable hostPath mount
  • Kubernetes CronJob
  • Privilege escalation – Once inside the environment, attackers leverage several techniques to access higher privileges, e.g.:
  • Privileged containers
  • Cluster-admin binding
  • hostPath mount
  • Access to cloud resources
  • Defense evasion – To hide their presence, attackers avoid detection using stealth tactics, e.g.:
  • Clearing container logs
  • Deleting Kubernetes events
  • Using a similar Pod name
  • Connecting from a proxy server
  • Credential access – Attempting to hack into more accounts by:
  • Listing Kubernetes secrets
  • Mounting service principals
  • Accessing container service accounts
  • Accessing credentials in config files
  • Discovery – Exploiting compromised Kubernetes environment through:
  • Accessing the Kube-API Server
  • Accessing the Kubelet API
  • Network mapping
  • Accessing the Kubernetes dashboard
  • Checking the cloud instance metadata API
  • Lateral Movement – Navigate and exploit the compromised environment by:
  • Accessing cloud resources
  • Using the container service account
  • Using cluster internal networking to reach other containers
  • Reading writable mounts on the nodes
  • Accessing the Kubernetes dashboard
  • Impact – Hackers destroy, abuse, or disrupt the ecosystem by:
  • Destroying data
  • Hijacking resources
  • Denial-of-service

The ATT&CK matrix is particularly popular due to the level of depth each tactic goes into. By regularly updating the threat models, the MITRE matrix considers regular industry trends to build a comprehensive list of cyberattack techniques and sub-techniques.

Benefits and drawbacks

Some benefits of the MITRE ATT&CK framework include:

  • Describes cyberattacks from the attacker’s perspective
  • Suggests preemptive actions to identify and mitigate vulnerabilities
  • Provides an up-to-date list of emerging hacking techniques and security landscape

‍However, due to the number of adversary data, techniques, and sub-techniques, the MITRE ATT&CK framework is large, complex, and often costly to implement. The framework is also less comprehensive when compared with CIS and often may offer ambiguous approaches rather than proposing exact steps to protect/evaluate a security control (Read more on Kubernetes security cost).

MITRE ATT&CK Matrix – how to use

The matrix lists various attack tactics that can potentially compromise a cloud-native environment based on real-world observations. By offering Indicators of Compromise and Indicators of Attack, the list helps security teams identify and study the mechanisms used by hackers across various stages of a cyber attack. The matrix also offers an adversarial approach that can be used by penetration testers, security defenders, cyber intelligence teams, red teams, and internal teams to create robust threat models and improve security posture. Besides adopting the practices outlined by the framework, organizations can also leverage open-source tools like Kubescape, which follows MITRE guidance to specifically harden Kubernetes clusters.

PCI DSS Compliance for Kubernetes

The Payment Card Industry Data Security Standard (PCI DSS) compliance framework outlines the technical and operational requirements to enable security and data protection for the payment industry. PCI DSS compliance is based on the following principles:

  • Build and maintain a secure network system
  • Secure cardholder data
  • Develop and maintain vulnerability management programs
  • Administer robust access control measures
  • Regular observability and debugging of networks
  • Periodic update and maintenance of information security policies

PCI DSS Cloud Computing Guidelines

An inherent challenge with respect to open-source packaging, container lifespan, and container sprawl is that certain attributes complicate regulatory compliance in a Kubernetes environment. To help simplify this, the PCI DSS framework outlines focused goals that are relevant to Kubernetes, including:

  • Identify all connections between the card data environment and other networks
  • Restrict connections with untrusted networks using firewalls and router connections
  • Develop configuration standards for all system components
  • Secure cryptographic key distribution
  • Separate development and production environments
  • Deploy change-detection mechanisms

‍Organizations adopting the cloud are often wary of the challenges in maintaining PCI DSS compliance. This is because when processing payments, containers communicate with many things on the platform, creating a tangled web of connections. To truly meet PCI standards, securing just containers isn’t enough. You also need to prioritize securing the tools managing them, like Kubernetes.

Benefits & drawbacks

Adopting the PCI DSS compliance framework for Kubernetes brings a number of benefits to organizations, including:

  • Standardized security practices
  • Improved security posture
  • Enhanced Data Security
  • Increased visibility and control
  • Improved overall system stability

‍While adopting PCI DSS for Kubernetes brings enhanced data security, compliance benefits, and operational efficiencies, it’s not without challenges. These include the need for specialized expertise, increased operational overhead, potential performance impacts, complex integrations, and challenges in managing alerts and keeping up with the evolving landscape. However, weighing these drawbacks against the substantial security and compliance benefits can help organizations make an informed decision about whether PCI compliance is the right choice for their specific Kubernetes environment. Remember, even without cardholder data, robust security practices inspired by PCI DSS principles are vital for any organization running sensitive workloads on Kubernetes.

PCI DSS Security Guidance – how to use

PCI DSS outlines various computing guidelines that organizations should follow to be compliant. These guidelines apply to all organizations that store, process, or transmit cardholder data such as payment gateways, banks, merchants, and developers.

NIST Application Container Security Framework

The National Institute of Standards and Technology (NIST) publishes a special Risk Management Framework for containers and containerized environments. This publication, also known as the NIST Application Container Security Guide, highlights security risks associated with containerized applications and practical recommendations to address them.

Risks, countermeasures, and considerations for the container technology life cycle

NIST categorizes security risks for containerized technologies across multiple layers of a platform, including:

Image risks

Registry risks

  • Insecure connections
  • Stale images
  • Insufficient authorization and authentication

Orchestrator risks

  • Unbounded administrative access
  • Poor isolation for inter-container traffic
  • Mixed sensitivity levels
  • Orchestrator node trust

Container risks

  • Runtime vulnerabilities
  • Insecure runtime configurations
  • App vulnerabilities
  • Rogue containers

Host OS risks

  • Large attack surface
  • Shared kernel
  • Improper access rights
  • File system tampering

Countermeasures and NIST recommended practices for a secure container orchestration include:

  • Tailor organizational culture to be aligned with container security best practices
  • Use container-focused operating systems
  • Group containers with the same sensitivity, purpose, and risk profile within the same kernel
  • Adopt vulnerability scanning and management tools that are container-focused
  • Use context-aware runtime security tools
  • Integrate hardware-based security countermeasures

‍Benefits & drawbacks

Adopting the NIST security framework for containers helps organizations via several benefits, including:

  • Trusted, standard methodologies for risk management
  • Helps organizations assess areas where the Kubernetes ecosystem requires hardened security controls
  • Helps prioritize the level of rigor in security control mechanisms

A drawback of the NIST security framework is that it includes requirements that can be approached in multiple ways, making it difficult to identify the specific controls needed to ensure compliance.

NIST Security Framework – how to use

The NIST Cybersecurity Framework is a voluntary standard that can be adopted by any IT organization leveraging container-led workflows. The NIST Risk Management Framework includes guidelines on how to conduct a comprehensive risk assessment, with a baseline integrated into the organization’s security strategy, before implementing security controls.

NSA offers general guidance on technical cybersecurity to help enterprises (in both the private and public sector) harden Kubernetes clusters and applications. The guidance includes the security challenges teams face when setting up Kubernetes clusters and strategies to avoid known misconfigurations. The report includes recommendations for comprehensive cluster hardening, such as:

Pod security

  • Use containers built as non-root users to host applications
  • Adopt image scanners to find vulnerabilities and misconfigurations in containerized applications
  • Use immutable file systems for containers
  • Leverage pod security standards to enforce minimum security levels

Network separation & hardening

  • Use a firewall and RBAC for access controls
  • Secure the etcd server
  • Administer TLS authentication to restrict access to control plane components
  • Isolate resources using network policies
  • Use Kubernetes secrets to store sensitive information like credentials

Authentication and authorization

  • Disable anonymous logins
  • Enforce strong authentication policies
  • Use RBAC policies to limit account activity

Audit logging

  • Enable audit logging
  • Persist logs for application availability
  • Set up a metrics logging platform

Upgrading and application security practices

  • Regularly apply security patches and updates
  • Perform penetration tests and vulnerability scans periodically
  • Remove redundant/non-essential components from the Kubernetes environment

Benefits & drawbacks

Benefits of using the NSA-CISA Kubernetes hardening guide include:

  • A threat modeling framework recommended for an entire supply chain for comprehensive security
  • Impactful guidance and remediation for insider threats
  • Promotes innovation and adoption of new security technologies

A major drawback of the NSA-CISA framework is that it does not include recommendations for container lifecycle security management.

NSA-CISA Kubernetes hardening guide – how to use

The NSA-CISA guidance outlines vulnerabilities within a Kubernetes ecosystem while recommending best practices on configuring a cluster for robust security. With recommendations on vulnerability scanning, identifying misconfigurations, log auditing, and authentication, the report ensures that common security challenges are appropriately addressed to mitigate risks. Besides adopting the practices outlined by the framework, organizations can also leverage open-source tools like Kubescape, which follows the NSA-CISA guidance to specifically harden Kubernetes clusters.

Kubernetes Security Frameworks – a quick comparison

Kubernetes security frameworks help define executive processes by outlining how organizations can maintain robust security and remain compliant. Each of the frameworks discussed above offers a unique approach to categorize various components of a Kubernetes ecosystem, as well as guidance on how to keep them secure. While emphasizing a proactive approach to mitigating risks, each framework essentially highlights the importance of efficient vulnerability scanning and comprehensive threat modeling as key practices in enhancing an organization’s security posture.

In addition, because of their focus on cybersecurity and Kubernetes cluster hardening, these frameworks have overlapping features and principles.

Security Frameworks
CISMITREPCI DSSNISTNSA-CISA
GOALProvide configuration benchmarksEnumerate all real-world attack tactics, techniques, and proceduresProtect cardholder dataIssue guidelines for a risk management frameworkEnable the hardening of Kubernetes Cluster
WHEN TO USEPre-productionIn productionDevelopment, testing, and productionTesting and vulnerability scanningPre-production
FOCUS AREASAuditing configuration managementThreat modelingAccess control, vulnerability managementRisk managementConfiguration management
HOW TO USECompare CIS standards with system configurationUse the prescribed techniques for pen tests and threat managementUse guidelines to create policies for data protectionUse the RMF to establish a baseline for security postureUse example configurations of hardened clusters
TOOLSKubescapeKubescapeTwistlockNIST SRE ToolsKubescape

However, as they were derived from the threat patterns of different industries, these guidance frameworks are often considered more appropriate for specific use cases rather than as a global standard for keeping any Kubernetes environment secure and compliant.

  • The CIS Kubernetes Framework offers benchmarks as guidelines for the secure configuration of cluster components.
  • The MITRE ATT&CK Matrix is mostly based on threat modeling, which offers adversarial insights and tactics on how organizations can secure their Kubernetes workloads post-compromise.
  • PCI DSS is a payment industry security standard and focuses on how to secure containers and the Kubernetes ecosystem of the cardholder’s data environment.
  • The NIST Framework is particularly concerned with risk management and outlines common risks for containerized applications and their countermeasures.
  • The NSA-CISA Framework offers guidance on hardening Kubernetes clusters with an emphasis on configuration management, the entire lifecycle of a supply chain, and insider threats.

Summary

Kubernetes continues to be the leading container orchestrator, being used or evaluated by used by over 96% of organziations today. While it offers a range of features in managing complex workloads, security and compliance remain a major concern with Kubernetes adoption. Since its introduction Kubernetes rapidly gained unprecedented popularity. Many disciplines, including security are still catching up.As a result, most frameworks do not yet offer focused guidelines toward the security and compliance of a Kubernetes ecosystem.

With the multiple integrations, built-in components, and processes of a Kubernetes environment, security is a complex undertaking. Although adopting a certain framework’s guidance will suit most organizations, adopting a multi-framework strategy for comprehensive security is also not uncommon. In the end, the goal is always the same: to achieve a robustly secure and compliant Kubernetes cluster that supports highly efficient and scalable applications.

Unifying AppSec, CloudSec and DevSec

The only runtime-driven, open-source first, cloud security platform Powered by Kubescape & eBPF

Continuously minimizes cloud attack surface

Based on runtime insights

Actively detecting and responding to cyberattacks

slack_logos

Continue to Slack

Get the information you need directly from our experts!

new-messageContinue as a guest