WriteUp
Forensics Git 1
1 分鐘
約 156 字
- 分類:Forensics
- 難度:Medium
- 題目連結:https://play.picoctf.org/practice/challenge/706
工具 #
過程 #
- 該題提供一個
.img.gz檔,將其解壓縮後得到一個.img檔。 - Windows 可直接使用 7-Zip 解壓縮對
.img右鍵 -> 7-Zip -> 開啟壓縮檔,然後檢查2.img發現/home/ctf-player/Code/secrets/有個.git
然後嘗試在 Secrets 資料夾下使用 git log
git log
commit 5fb8194539c770a830b8ba089a50778c07072b03 (HEAD -> master)
Author: ctf-player <ctf-player@example.com>
Date: Wed Nov 19 09:20:05 2025 +0000
Remove flag
commit 177789af0b300e043ea8f54ea57d6cee352291ae
Author: ctf-player <ctf-player@example.com>
Date: Wed Nov 19 09:20:05 2025 +0000
Add flag
發現曾有 commit 新增 flag,那就嘗試查看該 commit,使用 git show 177789af0b300e043ea8f54ea57d6cee352291ae 查看 flag
git show 177789af0b300e043ea8f54ea57d6cee352291ae
或是 checkout 到該 commit
git checkout 177789af0b300e043ea8f54ea57d6cee352291ae
就會發現目錄下有 flag.txt