Skip to main content

Posts

Showing posts with the label Bandit 24

Over the Wire - Bandit 24

Bandit 24 Objectives Level GoalA 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… Solution  alets check out the cron.d and see whats there bandit23@bandit:~$ ls /etc/cron.d cronjob_bandit22  cronjob_bandit23  cronjob_bandit24 cool lets see whats in the cronjob bandit23@bandit:~$ cat /etc/cron.d/cronjob_bandit24 @reboot bandit24 /usr/bin/cronjob_bandit24.sh &> /dev/null * * * * * bandit24 /usr/bin/cronjob_bandit24.sh &> /dev/null ok lets check that file in /usr/bin bandit23@bandit:~$ cat /usr/bin/cronjob_bandit24.sh #!/bin/bash myname=$(whoami) cd /var/spool/$m