linuxBandit Level 23 β†’ Level 24

cat /etc/cron.d/cronjob_bandit24

If we read it:

So it will execute all scripts in the /var/spool/bandit24/foo directory everyone minute, and then delete everything. So lets write a simple bash script that will copy /bin/bash binary to another file and give it setuid bit, and we will place it in the /tmp/Caesar3 directory:

Also we give everyone the permission to write in that directory we just created:

As we can see here is the bash binary, and we can execute it as the user bandit24:

Here is the password for the next user.

Note: Check for the script for instance every 30 seconds, if it was deleted, just copy it again, and wait.

Last updated