Exploit databaseDownload repository ZIP
GH-6871b2123b247ace74514eb27a323327
mirchr/cve-2025-32463-sudo-chwoot
Sources for CVE-2025-32463
52 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files3
mirchr/cve-2025-32463-sudo-chwootRevision dd697ff455bf
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
chwoot-demo.c
C · 641 bytes/*
Description: Simulate behavior of CVE-2025-32463 - sudo EoP via chroot.
Possible future CTF challenge? :)
gcc -Wall -o chwoot-demo chwoot-demo.c
cp 4755 chwoot-demo
mv chwoot-demo /usr/bin
Then get a root shell as a low priv user
*/
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <grp.h>
#include <netdb.h>
int main() {
chdir("/tmp/stage");
int saved_root = open("/",O_RDONLY);
int saved_cwd = open(".",O_RDONLY);
chroot("/tmp/stage");
chdir("/");
gethostbyname("woot");
fchdir(saved_root);
chroot(".");
fchdir(saved_cwd);
getgrnam("got root?");
}