-
OverTheWire: Level Goal: Bandit Level 20 → Level 21 풀이2021 SCP Mentoring/OverTheWire: Bandit 2021. 5. 23. 21:02
다음을 수행하는 setuid 바이너리가 홈 디렉터리에 있다.
명령 줄 인수로 지정한 포트에서 localhost에 연결합니다. 그런 다음 연결에서 텍스트 한 줄을 읽고 이전 수준 (bandit20)의 암호와 비교합니다. 비밀번호가 정확하면 다음 단계 (bandit21)의 비밀번호를 전송합니다. 라고한다.
이번 문제에서는 터미널이 2개 필요하니 bandit20 터미널을 2개 열어주자
bandit20@bandit:~$ nc -l -p 12345 GbKksEFF4yrVs6il55v6gwY5aVje5f0j gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr
한 쪽에서는 nc 명령어( 옵션 -l, -p )를 사용하여 리슨 서버를 열어주고
bandit20@bandit:~$ ./suconnect 12345 Read: GbKksEFF4yrVs6il55v6gwY5aVje5f0j Password matches, sending next password
다른 한 쪽에서는 ./suconnect를 사용하여 앞의 리슨 서버와 연결해준다.
후에 리슨 서버에 bandit20에 해당하는 password를 입력해주면, 다른 서버에서 password를 읽어들여 확인후 다음 Level을 위한 password를 돌려준다. 그렇게 얻은 password가 gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr 이다.
'2021 SCP Mentoring > OverTheWire: Bandit' 카테고리의 다른 글
OverTheWire: Level Goal: Bandit Level 19 → Level 20 풀이 (0) 2021.05.23 OverTheWire: Level Goal: Bandit Level 18 → Level 19 풀이 (0) 2021.05.23 OverTheWire: Level Goal: Bandit Level 17 → Level 18 풀이 (0) 2021.05.23 OverTheWire: Level Goal: Bandit Level 16 → Level 17 풀이 (0) 2021.05.17 OverTheWire: Level Goal: Bandit Level 15 → Level 16 풀이 (0) 2021.05.16