OverTheWire Bandit Level 11 to Level 15

 OverTheWire Bandit Level 11 to Level 15


Level 11 --> Level 12 :

The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions

下一級的密碼存儲在文件 data.txt 中,其中所有小寫 (a-z) 和大寫 (A-Z) 字母均已旋轉 13 個位置


向右 13 碼,A --> N、Z --> M

指令 : cat data.txt | tr '[A-Za-z]' '[N-ZA-Mn-za-n]'

bandit12 密碼 : JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv






Level 12 --> Level 13

The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)

下一級的密碼存儲在文件 data.txt 中,該文件是經過反覆壓縮的文件的十六進制轉儲。 對於此級別,在 /tmp 下創建一個目錄可能會很有用,您可以在其中使用 mkdir 進行工作。 例如:mkdir /tmp/myname123。 然後使用 cp 複製數據文件,並使用 mv 重命名它(閱讀手冊頁!)


登入後首先確認檔案存在 /home/bandit12 底下

創建一個 /tmp/20230628 路徑,將檔案複製到該路徑

執行 xxd -r 將檔案反轉回來取名為 data2.txt 並先刪除原有的 data.txt

file 確認檔案是一個 gzip 檔案

16 進制的表示法為

00000000: 4500 6d00 7000 7400 7900 0000 0000 0000  E.m.p.t.y.......

00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................

若有 cat 檔案就可以發現是一個 16 進制的檔案,所以要執行 xxd -r 轉回二進制




已知檔案為 gzip, 所以要重新命名為.gz 檔案再用 gzip -d 解壓縮

解完後 file 發現是一個 bzip2 檔案




將檔名再改成 bzip2 的格式 .bz2,再用 bzip2 -d 解壓縮後發現又是一個 gzip 檔案

將檔名再改成 gzip 的格式 .gz,再用 gzip -d 解壓縮後發現是一個 tar 檔案




將檔名再改成 tar 的格式 .tar,再用 tar -xvf 解出來後得到 data5.bin

先刪除原有的 tar 檔案,再 file data5.bin 後發現一樣是一個 tar 檔,所以再來一次

將檔名再改成 tar 的格式 .tar,再用 tar -xvf 解出來後得到 data6.bin

先刪除原有的 tar 檔案,再 file data6.bin 後發現是一個 bzip2 檔案




將檔名再改成 bzip2 的格式 .bz2,再用 bzip2 -d 解壓縮後發現又是一個 tar 檔案

將檔名再改成 tar 的格式 .tar,再用 tar -xvf 解出來後得到 data8.bin

記得先刪除原有的 tar 檔 data6.bin.tar,再 file data8.bin 發現是一個 gzip 檔案




將檔名再改成 gzip 的格式 .gz,再用 gzip -d 解壓縮後發現已經是一個 ASCII 檔案

直接 cat 該檔案後即可得到答案
bandit13 密碼 : wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw








Level 13 --> Level 14 :

The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. Note: localhost is a hostname that refers to the machine you are working on

下一級的密碼存儲在/etc/bandit_pass/bandit14 中,並且只能由用戶 bandit14 讀取。 對於此級別,您不會獲得下一個密碼,但您會獲得一個可用於登錄下一個級別的 SSH 私鑰。 注意: localhost 是指您正在使用的計算機的主機名


登入後在 home 目錄下發現有一個 Private Key
將檔案複製到 /tmp/20230628-key 路徑下取名為 private.key




直接使用 ssh 指令帶 bandit14 這個帳號並使用該 Private Key 來登入使用

記得要先將檔案的權限改成 600,chmod 600

登入後直接開啟 /etc/bandit_pass/bandit14 即可得到密碼

登入指令 : ssh -i private.key bandit14@localhost

bandit14 密碼 : fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq







Level 14 --> Level 15 :

The password for the next level can be retrieved by submitting the password of the current level to port 30000 on localhost.

可以通過將當前級別的密碼提交到本地主機的30000端口來檢索下一級的密碼。


直接 telnet localhost 30000 Pro 輸入 bandit14 的密碼即可得到下一關的密碼

bandit15 密碼 : jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt






Level 15 --> Level 16 :

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.

Helpful note: Getting “HEARTBEATING” and “Read R BLOCK”? Use -ign_eof and read the “CONNECTED COMMANDS” section in the manpage. Next to ‘R’ and ‘Q’, the ‘B’ command also works in this version of that command…

通過使用 SSL 加密將當前級別的密碼提交到 localhost 的 30001 端口,可以檢索下一級的密碼。

有用的註釋:獲得“HEARTBEATING”和“Read R BLOCK”? 使用 -ign_eof 並閱讀聯機幫助頁中的“連接命令”部分。 除了“R”和“Q”之外,“B”命令也適用於該命令的此版本......


直接使用 openssl 指令登入 localhost 30001 Port

指令 : openssl s_client -connect localhost:30001

bandit16 密碼 : JQttfApK4SeyHwDlI9SXGR50qclOAil1






留言

這個網誌中的熱門文章

Challenge 0 - Secura(2)

濫用 Windows 庫文件(Library File)

Challenge 0 - Secura(1)