Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Tenable Blog

Subscribe

Cr8escape: How Tenable Can Help (CVE-2022-0811)

CrowdStrike discloses container escape vulnerability affecting CRI-O for Kubernetes. Here’s how Tenable.cs can help you detect vulnerable pods.

Background

On March 15, CrowdStrike published technical details and a proof-of-concept for CVE-2022-0811, a vulnerability they have named cr8escape, in the CRI-O Container Engine for Kubernetes. CRI-O is an open source container runtime engine that is used to share kernel resources among applications running on a container node. There have not been any reported exploitations in the wild of this vulnerability at the time of publication.

CrowdStrike identified Red Hat’s OpenShift 4+ and Oracle Container Engine for Kubernetes as two products that integrate CRI-O and warns that other software and platforms may deploy the engine by default.

Analysis

CVE-2022-0811 is a container escape vulnerability in CRI-O that can lead to elevation of privileges. According to CrowdStrike, this vulnerability was introduced in CRI-O version 1.19 and allows an attacker to bypass the standard security controls that typically prevent one pod from changing the kernel parameters of others, allowing them to set arbitrary kernel parameters to the host.

An attacker with “rights to deploy a pod on Kubernetes cluster that uses the CRI-O runtime” could elevate their privileges and potentially execute code on other nodes in the cluster with root permissions. This could further allow the attacker to spread malware or exfiltrate sensitive data, making it a useful flaw for ransomware groups in particular.

Proof of concept

As part of their technical write up, CrowdStrike walked through a proof of concept that exploits CVE-2022-0811 to execute malware.

Solution

The vulnerability was introduced in CRI-O version 1.19 in September 2020 and impacts all versions since. On March 15, version 1.22.3 was released to address CVE-2022-0811. Both Oracle and Red Hat have deployed the fixed version as part of updates to Oracle Linux and OpenShift.

How Tenable.cs can help

To exploit this vulnerability on clusters running vulnerable versions of CRI-O, an attacker has to create a pod with a ‘sysctl’ containing “+” or “=” in the value.

Tenable.cs can help you detect such misconfigurations in your Kubernetes clusters by scanning your infrastructure as code (manifests, helm, or kustomize), as well as your runtime cluster.

Tenable.cs uses policy as code (open policy agent Rego) to find the misconfigurations in all your cluster workloads. Let’s take a look at the code that helps detect this misconfiguration.

Before CVE-2022-0811 was reported, Tenable.cs was already scanning your workloads against kernel level syscalls. The policy to check for these misconfigurations looks like this:

kernelLevelSysCalls[pod.id] {

pod := input.kubernetes_pod[_]

forbiddenSysctls = ["kernel.*"]

sysctl := pod.config.spec.securityContext.sysctls[_].name

forbidden_sysctl(sysctl, forbiddenSysctls)

}

forbidden_sysctl(sysctl, arg) {

arg[_] == sysctl

}

forbidden_sysctl(sysctl, arg) {

startswith(sysctl, trim(arg[_], "*"))

}

In the above policy, we are checking for the name of sysctl if it includes “kernel.” However, to detect CVE-2022-0811, we have added another policy which will first verify for kernel level calls through name as in the above policy, then it will check for the value in the sysctl and alert you if it contains [“=”, “+”].

{{.prefix}}{{.name}}{{.suffix}}[pod.id] {

pod := input.kubernetes_pod[_]

forbiddenSysctls = ["kernel.*"]

sysctl := pod.config.spec.securityContext.sysctls[_].name

forbidden_sysctl(sysctl, forbiddenSysctls)

disAllowedValues := ["=", "+"]

sysctlValue := pod.config.spec.securityContext.sysctls[_].value

contains(sysctlValue, disAllowedValues[_])

}

Note: The above policies are an example used just for kubernetes pods, Tenable.cs can scan the same for all different kinds of workloads, such as, Deployment/ReplicaSet/DaemonSet etc.

Now, let’s look at the Tenable.cs results for the scan of the pod used by CrowdStrike in its proof of concept.

Tenable.cs provides an issues tab with all the violations specific to the infrastructure one has scanned. The screenshot above shows the results of a failed CVE-2022-0811 policy check in Tenable.cs. For every violation, Tenable.cs provides technical details and remediation advice.

Identifying affected systems

A list of Tenable plugins to identify this vulnerability can be found here.

Get more information

Join Tenable's Security Response Team on the Tenable Community.

Learn more about Tenable, the first Cyber Exposure platform for holistic management of your modern attack surface.

Get a free 30-day trial of Tenable.io Vulnerability Management.

Related Articles

Cybersecurity News You Can Use

Enter your email and never miss timely alerts and security guidance from the experts at Tenable.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training