Level Goal


a program is running automatically at regualr intervals from cron, the time based job scheduler. look in /etc/cron.d/ for the configuration and see what command is being executed.
NOTE: looking at shell scripts written by other people is very useful skill. the script for this level is intentionally made easy to read. if you are having problems understanding what it does, try executing it to see the debug information it prints.

Solution


let’s begin by ls(1) the /etc/cron.d/ directory

img01

now we cat(1) the file named cronjob_bandit23 and see if it contains tasks for user bandit23.

img02

we can see that the cron service will run file /usr/bin/cronjob_bandit23.sh every minute, so let’s get some information about this file.

running file(1) on the file /usr/bin/cronjob_bandit23.sh, we find out that it’s a bash script.

img03

let’s cat(1) this bash script to seet it’s contents.

img04

well, the script calculates the MD5 digest of the standard input, then uses cut(1) to remove every section of the line in the standard input except for the MD5 digest.

knowing this we can construct the following command, execute it, get next level’s password and we are done!.

img05

⬆︎TOP