GithubHelp home page GithubHelp logo

cve-2024-21626-poc's Introduction

CVE-2024-21626-POC

使用说明

仅供教育/研究使用,任何与教育/研究无关的行为所产生的风险自行负责

使用

docker build . -t cve-2024-21626
docker run -it --rm cve-2024-21626 bash /poc.sh
# 另起一个terminal
/bin/bash.copy

注意

不同docker/runc版本使用的具体文件描述符有所不同,例如docker server:20.10.17 && runc version 1.1.2 的情况下使用 /proc/self/fd/9,实际的 fd 可能根据文件打开顺序而改变,官方文档中指出大多数情况下应该使用 /proc/self/fd/7 想要知道实际所使用的fd可以自行编译一个runc,在nsexec函数处sleep

#使用ps 找到对应runc init进程的pid
ps -ef | grep runc
# 查看指向/sys/fs/cgroup的fd
ls -lh/proc/{pid runc init}/fd

修改:在Dockerfile中修改WORKDIR为对应的值

前置条件

同时满足以下条件:

1. 可以创建容器并指定执行命令
2. 可以指定容器使用的镜像

漏洞原理

TODO

参考

https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv

https://github.com/opencontainers/runc/commit/2a4ed3e75b9e80d93d1836a9c4c1ebfa2b78870e

cve-2024-21626-poc's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.