Post

Bandit Level 15 → Level 16

문제

https://overthewire.org/wargames/bandit/bandit16.html

목표

다음 레벨의 비밀번호를 찾는다.

SSL 암호화를 사용하여 다음 현재 레벨의 비밀번호를 localhost의 30001번 포트에 제출하면 다음 레벨의 비밀번호를 검색할 수 있다.

관련 자료

SSL/TLS
OpenSSL Cookbook

풀이

ssh 명령어를 사용해 접속을 시도해보니 연결이 초기화된다.

1
2
3
bandit15@bandit:~$ ssh bandit15@localhost -p 30001
kex_exchange_identification: read: Connection reset by peer
Connection reset by 127.0.0.1 port 30001


nc 명령어를 사용해봐도 반응이 없다.

1
2
3
bandit15@bandit:~$ nc localhost 30001
jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt


openssl s_client 명령어의 -connect 옵션으로도 원격 호스트에 접속할 수 있다.

1
2
3
4
5
6
7
8
9
10
11
12
bandit15@bandit:~$ openssl s_client -connect localhost:30001
CONNECTED(00000003)
.
.
.
---
read R BLOCK
jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt
Correct!
JQttfApK4SeyHwDlI9SXGR50qclOAil1

closed

현재 레벨의 패스워드를 제출하니 다음 레벨의 패스워드가 검색되었다.


Password : JQttfApK4SeyHwDlI9SXGR50qclOAil1

배운 것

  • openssl s_client 명령어의 -connect 옵션을 사용해 원격 호스트에 접속할 수 있다.
This post is licensed under CC BY 4.0 by the author.