mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3
181 字
1 分鐘
[OverTheWire] Bandit Level 30 → Level 31
2025-01-24

Level Goal#

There is a git repository at ssh://bandit30-git@localhost/home/bandit30-git/repo via the port 2220. The password for the user bandit30-git is the same as for the user bandit30.

Clone the repository and find the password for the next level.

Commands you may need to solve this level#

  • git

My Answer (Step by step)#

  1. 連線到伺服器並登入
ssh bandit30@bandit.labs.overthewire.org -p 2220
  1. 透過 mktemp 指令產生暫存資料夾,並透過 cd 指令進入它,以便稍後 clone git repo
mktemp -d
cd /tmp/tmp.j06e86YteI
  1. 透過 git 指令將 repo clone 下來
git clone ssh://bandit30-git@localhost:2220/home/bandit30-git/repo
  1. 透過 cd 指令進入 repo 資料夾,並透過 ls 指令查看資料夾內容
cd repo
ls
# README.md
  1. 透過 cat 指令讀取 README.md 檔案,發現沒有密碼 :(
cat README.md
# just an epmty file... muahaha
  1. 透過 git tag 指令發現有一個 secret tag
git tag
# secret
  1. 透過 git show 指令將 secret tag 的內容呈現出來,發現 Level 31 密碼!
git show secret
分享

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

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

部分資訊可能已經過時

目錄