tutorial · bandit

Bandit Level 23

Follow the cron job logic: it computes a filename, writes the password there.
banditcronshell
Optional narration
Marks this level complete in your browser.

Goal

Another cron-driven program runs at regular intervals. You need to read the cron config and then understand the script.

Hints

  • Same start: /etc/cron.d/.
  • This level’s script prints helpful debug output if you run it manually.
  • Look for variables that compute a target filename.
Solution (click to reveal)
  1. SSH in:
ssh bandit23@bandit.labs.overthewire.org -p 2220
  1. Find the cron job and script:
cat /etc/cron.d/*
  1. Read the referenced script (often named cronjob_bandit23.sh):
cat /usr/bin/cronjob_bandit23.sh
  1. Identify where it writes the output (usually /tmp/...). Then cat that file to get the next password.

Notes

  • Running the script manually can show you the computed output path.