mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3
142 字
1 分鐘
[OverTheWire] Bandit Level 6 → Level 7
2025-01-22

Level Goal#

The password for the next level is stored somewhere on the server and has all of the following properties:

  • owned by user bandit7
  • owned by group bandit6
  • 33 bytes in size

Commands you may need to solve this level#

  • ls
  • cd
  • cat
  • file
  • du
  • find
  • grep

My Answer (Step by step)#

  1. 連線到伺服器並登入
ssh bandit6@bandit.labs.overthewire.org -p 2220
  1. 由於題目說檔案在伺服器的某個地方,故透過 cd 指令進入根目錄
cd /
  1. 透過 find 指令找到符合使用者名稱與群組條件的檔案
find / -user bandit7 -group bandit6
  1. 根據前面指令結果顯示的檔案路徑,透過 cat 指令即可查看 Level 7 密碼!
cat /var/lib/dpkg/info/bandit7.password
分享

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

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

部分資訊可能已經過時

目錄