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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2024-21626-demo — 演示 CVE-2024-21626 容器逃逸漏洞利用,通过恶意 Docker 镜像获取宿主机 root 权限,并包含逐步攻击场景,仅用于教育目的。 | Kitploit
工具/GitHubGitHub/laysakura/cve-2024-21626-demo
容器安全漏洞分析漏洞利用学习与教育容器逃逸实验室与实践
GitHublaysakura/cve-2024-21626-demo

CVE-2024-21626-demo

演示 CVE-2024-21626 容器逃逸漏洞利用,通过恶意 Docker 镜像获取宿主机 root 权限,并包含逐步攻击场景,仅用于教育目的。

查看仓库
342年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2024-21626-demo

Container Runtime Meetup #5 的 LT 演示用。

基于公开信息旨在普及攻击风险,严禁滥用。

幻灯片

Container Runtime Meetup #5 ~那个镜像,真的可信吗?~ 使用 CVE-2024-21626 夺取宿主机的 root 权限

登录 victim-server

演示用笔记本电脑的 ssh_config 中注册为 victim-server 的机器。

root@kitploit:~
ssh victim-server

作为受害前提条件的版本信息:

root@kitploit:~
ubuntu@victim-server:$ docker --version
Docker version 20.10.25+dfsg1, build b82b9f3

ubuntu@victim-server:$ runc --version
runc version 1.1.10+ds1
commit: 1.1.10+ds1-1
spec: 1.1.0
go: go1.21.3
libseccomp: 2.5.4

登录 attacker-server

同样地

root@kitploit:~
ssh attacker-server

场景

1. [victim-server] 误获取、构建并运行恶意 Docker 镜像

root@kitploit:~
ubuntu@victim-server:~$ git clone [email protected]:laysakura/CVE-2024-21626-demo.git
ubuntu@victim-server:~$ cd CVE-2024-21626-demo/
ubuntu@victim-server:~/CVE-2024-21626-demo$ docker build -t myimage .
ubuntu@victim-server:~/CVE-2024-21626-demo$ docker run -it myimage

2. [victim-server] /root/.ssh/authorized_keys 被意外替换为攻击者的公钥

原本并非故意,此处不执行任何操作,但给出用于确认状况的命令。

root@kitploit:~
ubuntu@victim-server:~$ sudo cat /root/.ssh/authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKPHHGSytV6bL1ryaEKE9XNWN23piXdzsI3Rzxe20IF6 ubuntu@attacker-server

3. [attacker-server] 以 root 身份登录 victim-server

root@kitploit:~
attacker@attacker-server:~$ ssh -i .ssh/id_ed25519 root@victim-server

root@victim-server:~# id
uid=0(root) gid=0(root) groups=0(root)

References

  • https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv
  • https://github.com/NitroCao/CVE-2024-21626
下载工具