WH02 - 500pts
Briefing
Access the site at https://cfta-wh02.allyourbases.co and find a way to get the flag.
Solution
We can try directory bruteforcing because the website source code does not reveal anything. Let's use
gobuster:gobuster dir -u https://cfta-wh02.allyourbases.co/ -t 200 --exclude-length 16 -w /usr/share/wordlists/dirb/common.txt. We exclude the length16because 404 pages return HTTP status code 403 and have a length of 16. Running the command finds/.git/HEAD, which means there is a publicly facing git repository on the website.We can download the git repo with
wget -r -np -R "index.html*" https://cfta-wh02.allyourbases.co/.git/. Rungit checkout -- .to restoreindex.htmlsince we only download the.git/folder, not the entire working directory.Run
git logto look for previous commits. Sure enough there is one previous commit. Rungit checkout 80e789704ddca67d772dbc34de1088e8c1917e9dto revert to that previous version. There is now asetup.shfile.cat setup.shshows the flagFLAG="giTisAGreat_ResoURCe8337"
Flag
giTisAGreat_ResoURCe8337
Last updated
Was this helpful?