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.Commands you may need to solve this level
cron, crontab, crontab(5) (use "man 5 crontab" to access this)Solution:
- [Comment] Using SSH to connect the server
- sp@simple-plan:~|=> ssh bandit21@bandit.labs.overthewire.org
...
bandit21@bandit.labs.overthewire.org's password: gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr - [Comment] Using cd command to change the shell working directory
- bandit21@melinda:~$ cd /etc/cron.d
- [Comment] Using ls command to list directory contents
- bandit21@melinda:/etc/cron.d$ ls
boobiesbot-check cronjob_bandit24 manpage3_resetpw_job natas26_cleanup semtex0-ppc semtex6 vortex0 cron-apt eloi0 natas-session-toucher php5 semtex10 semtex8 vortex20 cronjob_bandit22 eloi1 natas-stats semtex0-32 semtex12 semtex9 vulnbot0-check cronjob_bandit23 hintbot-check natas25_cleanup semtex0-64 semtex5 sysstat vulnbot1-check - [Comment] Using cat command to output file's contents
- bandit21@melinda:/etc/cron.d$ cat cronjob_bandit22
* * * * * bandit22 /usr/bin/cronjob_bandit22.sh &> /dev/null - [Comment] Using cat command to check the script content
- bandit21@melinda:/etc/cron.d$ cat /usr/bin/cronjob_bandit22.sh
#!/bin/bash
chmod 644 /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
cat /etc/bandit_pass/bandit22 > /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
- [Comment] Using cat command to fetch out the password for next level
- bandit21@melinda:/etc/cron.d$ cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
Yk7owGAcWjwMVRwrTesJEwB7WVOiILLI - [Comment] Using exit command to disconnect connection to server
- bandit21@melinda:/etc/cron.d$ exit
logout
Connection to bandit.labs.overthewire.org closed. - [Comment] It's done! Saving the password for next level.
No comments:
Post a Comment