bandit15 link
https://overthewire.org/wargames/bandit/bandit16.html
이 레벨을 풀기 위해 알아야 하는 커맨드들은 아래와 같다.
문제 :
The password for the next level can be retrieved by submitting the password of the current level to port 30001 on localhost using SSL encryption.
문제 풀이 :
opeenssl s_client [옵션][호스트:포트]
openssl s_client -connect localhost:30001
위의 커맨드를 입력하면 아래와 같은 SSL/TLS 커넥션이 이뤄진다.
1. SSL/TLS Handshake:
Can't use SSL_get_servername
depth=0 CN = localhost
verify error:num=18:self-signed certificate
verify return:1
depth=0 CN = localhost
verify error:num=10:certificate has expired
notAfter=Jan 25 20:43:52 2024 GMT
verify return:1
depth=0 CN = localhost
notAfter=Jan 25 20:43:52 2024 GMT
verify return:1
2. Certificate:
-----BEGIN CERTIFICATE-----
MIIDCzCCAfOgAwIBAgIEXPQtNDANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDDAls
b2NhbGhvc3QwHhcNMjQwMTI1MjA0MjUyWhcNMjQwMTI1MjA0MzUyWjAUMRIwEAYD
...
-----END CERTIFICATE-----
인증서를 받는다.
3. SSL/TLS Session Information:
SSL handshake has read 1339 bytes and written 373 bytes
Verification error: certificate has expired
몇 바이트를 읽고 썼는지 확인
이후 현재 단계 비밀번호를 입력 하면 다음 단계로 넘어갈 수 있다.
[1] https://overthewire.org/wargames/bandit/bandit16.html
[2] https://www.cloudflare.com/ko-kr/learning/ssl/what-happens-in-a-tls-handshake/
[3] https://m.blog.naver.com/alice_k106/221468341565