Tar Wilcard Injection
Last updated
Last updated
Check to see where these scripts change their directory to. In this case it was the /var/www/html directory, somewhere were we have write access.
We then create two empty files using touch
. The first will cause tar
to cause a checkpoint on every file and the second will tell tar
to execute our exploit.sh with bash
on every checkpoint.
After a few minutes, we check if the cron job has run and if SUID is set on /bin/bash.
You can follow this blog for the other different methods to escalate.
Refer to the box Readys.