OverTheWire - Bandit - Level 21 → Level 22
1.) you want to see a possible alternative solution or
2.) you are stuck and need a hint!
Connect to the server using the following credentials:
Level Goal is:
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.
Check the content of the folder /etc/cron.d/:
There are three files, the first one (cronjob_bandit22) is the interesting one for the current level. Take a look at the content:
A script (/usr/bin/cronjob_bandit22.sh) will be executed once on reboot and every minute. Take a look at the content of the script:
The script writes the password from the next level (/etc/bandit_pass/bandit22) to a temporary folder (/tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv). We can read it and get the password for the next level: