mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3
151 字
1 分鐘
[OverTheWire] Bandit Level 19 → Level 20
2025-01-24

Level Goal#

To gain access to the next level, you should use the setuid binary in the homedirectory. Execute it without arguments to find out how to use it. The password for this level can be found in the usual place (/etc/bandit_pass), after you have used the setuid binary.

My Answer (Step by step)#

  1. 連線到伺服器並登入
ssh bandit19@bandit.labs.overthewire.org -p 2220
  1. 透過 ls 指令可以發現目錄中有一個檔案 bandit20-do,可以直接使用該檔案查看如何使用它
ls
./bandit20-do
# Run a command as another user.
# Example: ./bandit20-do id

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

  1. 透過 bandit20-do 檔案使用 cat 指令來呈現 Level 20 密碼!
./bandit20-do cat /etc/bandit_pass/bandit20
分享

如果這篇文章對你有幫助,歡迎分享給更多人!

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

部分資訊可能已經過時

目錄