NCS Competition 2021 Writeup
  • HHousen National Cyber Scholarship Competition 2021 Writeup
  • Forensics
    • FE02 - 100pts
    • FE03 - 100pts
    • FH01 - 500pts
    • FE04 - 100pts
    • FM01 - 250pts
    • FM02 - 250pts
    • FM03 - 250pts
    • FE01 - 100pts
  • Crypto
    • CM01 - 250pts
    • CM02 - 250pts
    • CX01 - 1000pts
    • CH01 - 500pts
    • CH02 - 500pts
  • Binary
    • BM01 - 250pts
    • BM02 - 250pts
    • BM03 - 250pts
    • BX01 - 1000pts
    • BX02 - 100pts
    • BE01 - 100pts
    • BE02 - 100pts
    • BH01 - 500pts
  • Networking
    • NM01 - 250pts
    • NE01 - 100pts
  • Web
    • WX01 - 1000pts
    • WE01 - 100pts
    • WE02 - 100pts
    • WH01 - 500pts
    • WH02 - 500pts
    • WM01 - 250pts
    • WM02 - 250pts
    • WM03 - 250pts
    • WM04 - 250pts
    • WM05 - 250pts
  • Challenge Name
Powered by GitBook
On this page
  • Briefing
  • Solution
  • Flag

Was this helpful?

Edit on Git
  1. Web

WH02 - 500pts

PreviousWH01 - 500ptsNextWM01 - 250pts

Last updated 4 years ago

Was this helpful?

Briefing

Access the site at and find a way to get the flag.

Solution

  1. 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 length 16 because 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.

  2. We can download the git repo with wget -r -np -R "index.html*" https://cfta-wh02.allyourbases.co/.git/. Run git checkout -- . to restore index.html since we only download the .git/ folder, not the entire working directory.

  3. Run git log to look for previous commits. Sure enough there is one previous commit. Run git checkout 80e789704ddca67d772dbc34de1088e8c1917e9d to revert to that previous version. There is now a setup.sh file. cat setup.sh shows the flag FLAG="giTisAGreat_ResoURCe8337"

Flag

giTisAGreat_ResoURCe8337

https://cfta-wh02.allyourbases.co