164 字
1 分鐘
[OverTheWire] Bandit Level 26 → Level 27

Level Goal#

Good job getting a shell! Now hurry and grab the password for bandit27!

Commands you may need to solve this level#

  • ls

My Answer (Step by step)#

  1. 連線到伺服器並登入,登入後需要一系列的步驟才可以進入 shell,請參考 [Level 25 → Level 26]({{< ref “/posts/2025-01-24-post144357.md” >}})
Terminal window
ssh bandit26@bandit.labs.overthewire.org -p 2220
  1. 透過 ls 指令可以發現目錄中有一個檔案 bandit27-do,可以直接使用該檔案查看如何使用它
Terminal window
ls
./bandit27-do
# Run a command as another user.
# Example: ./bandit27-do id

{{< alert info >}} 根據程式結果說明,我們可以透過該檔案以使用者 bandit27 來執行指令 {{< /alert >}}

  1. 透過 bandit27-do 檔案使用 cat 指令來呈現 Level 27 密碼!
Terminal window
./bandit27-do cat /etc/bandit_pass/bandit27

第 27 篇,共 34 篇本文屬於系列

[OverTheWire] Bandit Level 26 → Level 27
https://m21248074.github.io/blog/posts/2025-01-24-post154555/
作者
Cavey (凱維)
發佈於
2025-01-24
許可協議
CC BY-NC-SA 4.0

分享文章

生成精美分享圖或複製連結,與更多人分享本文。

繼續閱讀

沿著主題讀

基於共同的標籤與分類

換條路線

從其他文章中穩定抽取

最後更新於 ,距今已過 631 天

部分內容可能已過時