Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
xzk8s — 用于复现 CVE-2024-3094 的 Dockerfile 和 Kubernetes 清单 | Kitploit
工具/GitHubGitHub/r0binak/xzk8s
容器安全漏洞分析漏洞利用渗透测试云安全供应链安全
GitHubr0binak/xzk8s

xzk8s

用于复现 CVE-2024-3094 的 Dockerfile 和 Kubernetes 清单

查看仓库
1432年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

xzk8s

Docker Pulls xzk8s

Dockerfile和Kubernetes清单,用于复现CVE-2024-3094

构建镜像

我们使用易受攻击的xz utils的Debian版本作为基础镜像。我们还需要修补库。补丁版liblzma库取自xzbot仓库。

root@kitploit:~
FROM debian:experimental-20240311@sha256:16cc2b09c44d991d36f63153f13a7c98fb7da6bd2ba9d7cc0f48baacb7484970
# use debian with a vulnerable version of xz utils as the base image
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:root123' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config

EXPOSE 22

COPY liblzma.so.5.6.0.patch /root/
# in order to exploit the vulnerability you must use a patched library because 
# the exploit author originally hardcoded his public key
# in the patched library this key has been swapped out

ENV LD_PRELOAD=/root/liblzma.so.5.6.0.patch

# load the patched library via LD_PRELOAD

CMD ["/usr/sbin/sshd", "-D"]

漏洞利用演示

首先,我们必须部署一个简单的Pod,使用上一步构建的镜像:

root@kitploit:~
apiVersion: v1
kind: Pod
metadata:
  name: cve-2024-3094
  labels:
    app: cve-2024-3094
spec:
  containers:
  - name: cve-2024-3094
    image: r0binak/xzk8s:v1
    ports:
    - containerPort: 22

然后,端口转发:

root@kitploit:~
kubectl port-forward backdoor-cve-2024-3094 2222:22

让我们使用xzbot漏洞利用:

最后,让我们进入容器并检查漏洞利用结果:

参考

  • https://github.com/amlweems/xzbot/
  • https://www.openwall.com/lists/oss-security/2024/03/29/4
  • https://gist.github.com/smx-smx/a6112d54777845d389bd7126d6e9f504
  • https://gist.github.com/q3k/af3d93b6a1f399de28fe194add452d01
  • https://gist.github.com/keeganryan/a6c22e1045e67c17e88a606dfdf95ae4
下载工具