level22->level23
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.
NOTE: Looking at shell scripts written by other people is a 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.
문제를 보면, 우선 이전 문제와 똑같다.
여기까지도 똑같다.
그런데, 여기서 bash 스크립트가 나타난다.
이 스크립트를 해석해보면,
그러나 우리는 bandit23의 비밀번호를 알아야 하므로,
echo I am bandit23 | md5sum | cut -d ‘ ‘ -f 1
명령을 실행하면 다음과 같이 해당 문자열에 대한 해시값이 출력된다.
위와 같이 해당 해시값이 /tmp/
에 저장되므로 해당 파일을 읽으면 bandit23의 비밀번호를 알 수 있다.
비밀번호 : QYw0Y2aiA672PsMmh9puTQuhoz8SyR2G