OverTheWire Bandit Level 0 to Level 5

OverTheWire Bandit Level 0 to Level 5 


網站 : https://overthewire.org/wargames/bandit/

Level 0 : 

The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org, on port 2220. The username is bandit0 and the password is bandit0. Once logged in, go to the Level 1 page to find out how to beat Level 1.

此級別的目標是讓您使用 SSH 登錄遊戲。 您需要連接的主機是 bandit.labs.overthewire.org,端口 2220。用戶名是 bandit0,密碼是 bandit0。 登錄後,轉到第 1 級頁面,了解如何通過第 1 級。

Level 0 很簡單只是要你依據左上角的資訊登入主機

主機 : bandit.labs.overthewire.org

帳號 : bandit0

密碼 : bandit0






Level 0 --> Level 1 :

The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.

下一級的密碼存儲在主目錄中名為 readme 的文件中。 使用此密碼通過 SSH 登錄 bandit1。 每當您找到某個關卡的密碼時,請使用 SSH(在端口 2220 上)登錄該關卡並繼續遊戲。


在 bandit0 登入後的 home 目錄即可看到 readme 文件,cat 即可得到下一關的密碼

bandit1 密碼 : NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL





Level 1 --> Level 2 :

The password for the next level is stored in a file called - located in the home directory

下一級的密碼存儲在主目錄中名為 - 的文件中


因為檔案名稱為 "-",ls 後可以看到檔案名稱如下圖,但直接 cat - 是無法顯示檔案的

因為系統會將 - 判斷為參數指令的一種


這題考的是透過絕對路徑的表示法來開啟文件,即可得到下一關的密碼

bandit2 密碼 : rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi





Level 2 --> Level 3 :

The password for the next level is stored in a file called spaces in this filename located in the home directory

下一級的密碼存儲在主目錄中名為 "space in this filename" 的文件中


登入後 ls 即可看到檔案名稱為 "space in this filename" 的檔案

這一題考的是當檔案名稱中間有空白鍵時要如何透過指令去查看

其實輸入 cat space 後按下 TAB 鍵就可以得到答案了

bandit3 密碼 : aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG





Level 3 --> Level 4 :

The password for the next level is stored in a hidden file in the inhere directory.

下一級的密碼存儲在 inhere 目錄的隱藏文件中。


這一題考的是隱藏文件(開頭會有一個 "."),一樣先 ls 一下看到 inhere 資料夾

進入後使用 ls -al 即可看到隱藏文件,直接 cat 就可以得到答案了

Level4 密碼 : 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe





Level 4 --> Level 5 :

The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command.

下一級的密碼存儲在 inhere 目錄中唯一人類可讀的文件中。 提示:如果您的終端出現問題,請嘗試“重置”命令。


這一題告知在 inhere 下有一個唯一人類可讀的檔案,所以使用 file 這個指令

可以看到僅有 -file07 是 ASCII 格式,所以就是他了,因為檔案名稱開頭是 "-"

所以一樣 cat 絕對路徑就可以得到答案了

bandit5 密碼 : lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR







Level 5 --> Level 6 :

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

  • human-readable
  • 1033 bytes in size
  • not executable

下一級的密碼存儲在 inhere 目錄下的某個文件中,並具有以下所有屬性:

人類可讀的

大小為 1033 字節

不可執行


登入後進入 inhere 目錄下可以看到有許多資料夾,可以透過 find 這個指令來查找文件




要人類可讀,大小又是 1033 bytes,又不可執行,可以透過以下的指令來查詢

find 加上參數 -type 後面接 f (f 指檔案,d 是目錄,我們要找檔案所以用 f)

另外大小的參數是 -size,1033 bytes 的表示法為 1033c

不可執行就直接下 ! -executable

完整指令 : "find -type f -size 1033c ! -executable"

即可看到僅有一個檔案在 maybehere07 目錄底下的 .file2,那就直接 cat 吧

bandit6 密碼 : P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU




留言

這個網誌中的熱門文章

Challenge 0 - Secura(2)

濫用 Windows 庫文件(Library File)

Challenge 0 - Secura(1)