Bandit 23

OverTheWire Bandit 23

Level Goal

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/ Looks like i made a typo on line 1.


I chmod the permission on the file, 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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s