--- title: "OverTheWire: Bandit 解題筆記|Level 15 → Level 16" tags: - OverTheWire - Bandit - Linux - 資訊安全 --- # OverTheWire: Bandit 解題筆記|Level 15 → Level 16 ## 登入 ```shell $ ssh -p 2220 bandit15@bandit.labs.overthewire.org ``` 密碼:`jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt` ## 題目 **關卡目標** 下一關的密碼可以通過將當前關卡的密碼使用 SSL 加密連線,提交到 `localhost` 上的埠 `30001` 來獲取。 :::info <i class="fa fa-info-circle" aria-hidden="true"></i> **提示**:如果遇到 “HEARTBEATING” 和 “Read R BLOCK” 的情況,請使用 `-ign_eof` 選項,並閱讀 `man` 頁面中的 “CONNECTED COMMANDS” 部分。除了 `R` 和 `Q` 指令外,`B` 指令在該的這個版本中也能使用。 ::: **你可能需要用到的命令** ssh, telnet, nc, openssl, s_client, nmap **有用的閱讀資料** [Secure Socket Layer/Transport Layer Security on Wikipedia](https://en.wikipedia.org/wiki/Transport_Layer_Security) [OpenSSL Cookbook - Testing with OpenSSL](https://www.feistyduck.com/library/openssl-cookbook/online/ch-testing-with-openssl.html) **使用示例** ```sh openssl s_client -connect localhost:30001 -ign_eof ``` 在提示符下輸入當前關卡的密碼,然後按Enter鍵,你應該會看到下一關的密碼。 ## 解題思路 根據題目的指示要透過 `SSL` 連接到 `localhost:30001`,並把這關的密碼貼上去來獲取下一關的密碼。 ## 詳解 ```shell bandit15@bandit:~$ openssl s_client -connect localhost:30001 -ign_eof CONNECTED(00000003) ... read R BLOCK jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt Correct! JQttfApK4SeyHwDlI9SXGR50qclOAil1 closed ``` [OverTheWire: Bandit 解題筆記|Level 16 → Level 17](/_qlIlXdORmW1NYfHBBkV7A)