OverTheWire Bandit 23
A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.
NOTE: This level requires you to create your own first shell-script. This is a very big step and you should be proud of yourself when you beat this level!
NOTE 2: Keep in mind that your shell script is removed once executed, so you may want to keep a copy around…
Once again, looking under /etc/cron.d reveals there isa cronjob_bandit24 file. Looking inside we see that it runs whatever files are located inside /var/spool/$myname, before deleting them.
We need to create a bash script in the spool/bandit24 folder to reveal the password to us. I use the echo command to append a series of commands into /var/spool/bandit24/b.sh. Looks like i made a typo on line 1.
I chmod the permission on the file b.sh, however I think it inherited the execute flags needed from the folder permissions. The cron job runs once a minute. After a period of time, you can see that the spool folder is deleted. I then check to see if we have the results waiting in /tmp/ant24 file.