[Bandit-OverTheWire] Level 21 -> Level 22
두비니
·2020. 9. 24. 16:12
Bandit Level 21 → Level 22Level 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. Commands you may need to solve this levelcron, crontab, crontab(5) (use “man 5 crontab” to access this) |
접속
접속 : ssh bandit21@bandit.labs.overthewire.org -p2220
pw : gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr
cron이라는걸로 실행하고있는데 /etc/cron.d/를 보라고 하네요. 봅시다
bandit21@bandit:~$ cd /etc/cron.d
bandit21@bandit:/etc/cron.d$ ls
cronjob_bandit15_root cronjob_bandit22 cronjob_bandit24
cronjob_bandit17_root cronjob_bandit23 cronjob_bandit25_root
일단 bandit22를 봅시다
bandit21@bandit:/etc/cron.d$ cat cronjob_bandit22
@reboot bandit22 /usr/bin/cronjob_bandit22.sh &> /dev/null
* * * * * bandit22 /usr/bin/cronjob_bandit22.sh &> /dev/null
뭔진모르겠다만 저기 알려주는거봐서 들어가봅시다
bandit21@bandit:~$ cd /usr/bin/cronjob_bandit22.sh
-bash: cd: /usr/bin/cronjob_bandit22.sh: Not a directory
bandit21@bandit:~$ cat /usr/bin/cronjob_bandit22.sh
#!/bin/bash
chmod 644 /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
cat /etc/bandit_pass/bandit22 > /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
오 bandit22 내용을 저 tmp파일에 넣어놨네요
bandit21@bandit:~$ cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
Yk7owGAcWjwMVRwrTesJEwB7WVOiILLI
굳
'War Games > Bandit - OverTheWire' 카테고리의 다른 글
[Bandit-OverTheWire] Level 23 -> Level 24 (0) | 2020.09.25 |
---|---|
[Bandit-OverTheWire] Level 22 -> Level 23 (0) | 2020.09.24 |
[Bandit-OverTheWire] Level 20 -> Level 21 (0) | 2020.09.24 |
[Bandit-OverTheWire] Level 19 -> Level 20 (0) | 2020.09.23 |
[Bandit-OverTheWire] Level 18 -> Level 19 (0) | 2020.09.23 |