178 字
1 分鐘
[OverTheWire] Bandit Level 18 → Level 19
Level Goal
The password for the next level is stored in a file readme in the homedirectory. Unfortunately, someone has modified .bashrc to log you out when you log in with SSH.
Commands you may need to solve this level
- ssh
- ls
- cat
My Answer (Step by step)
- 連線到伺服器並登入
ssh bandit18@bandit.labs.overthewire.org -p 2220{{< alert info >}} 連線後可以發現馬上被登出 {{< /alert >}}
- 連線回上一等級,並透過 cat 指令找尋伺服器還有哪些shell可以使用
ssh bandit17@bandit.labs.overthewire.org -p 2220cat /etc/shells# /usr/bin/sh# /bin/bash# /usr/bin/bash# /bin/rbash# /usr/bin/rbash# /usr/bin/dash# /usr/bin/screen# /usr/bin/tmux# /usr/bin/showtext{{< alert info >}} 根據指令結果,可以發現還有 sh, tmux 等 shell可以使用 {{< /alert >}}
- 重新連線伺服器,但這次指定透過 sh shell 登入
ssh bandit18@bandit.labs.overthewire.org -p 2220 -t sh- 透過 cat 指令將 readme檔案內容呈現至畫面上,即可取得 Level 19 密碼!
cat readme 分享
如果這篇文章對你有幫助,歡迎分享給更多人!
[OverTheWire] Bandit Level 18 → Level 19
https://m21248074.github.io/blog/posts/2025-01-24-post092436/ 部分資訊可能已經過時
相關文章 智能推薦


