Skip to content
PURPLEDUEL

The repository on the server

Web Exploitation · hard level · 5 objectives · 770 XP in total

Officine Rossi redid its website and published it by copying the developer’s working folder to the server as it was. Check what went online besides the pages: if something looks out of place, follow the thread all the way to the administration panel.

Lab 11 of 11 in the Web Exploitation path. If you get stuck you have 3 hints, from the vaguest to the most precise: they cost 0, 50 and 150 XP.

What you learn

Objectives complete themselves while you work in the terminal; each one is worth experience points:

  • Map the site’s pages (50 XP)
  • Find the version-control folder served by the site (120 XP)
  • Read the repository configuration (150 XP)
  • Open the repository with the credentials found (200 XP)

Topics: web, deploy, segreti, versionamento.

Commands you will use

The terminal is simulated and understands about forty Linux commands. In this lab you will mostly need these:

  • cat: prints the contents of a file: the most direct way to read configurations, notes and logs.
  • gobuster: automatically tries a list of folder and page names on a website, to find what no link shows.
  • curl: makes HTTP requests from the terminal and shows the server’s raw answer, headers included.

The simulated environment

The target is an invented host on a simulated private network: you can only reach it from the game terminal.

The target exposes these services:

  • Web (HTTP): a web server with pages, APIs or admin panels: the most exposed part of almost every organisation.

The defensive lesson

Once the lab is solved, the write-up explains what went wrong and how to protect yourself:

The site was published by copying the whole working folder, version-control folders included: anyone who requests them reads the repository configuration, and there was an address with a username and password built in, reused for the administration panel too. No special skill is needed, just the right address. Defense: publish only the files produced by the build (never the working folder), make the web server refuse everything that starts with a dot, never write credentials in repository addresses (read-only keys or a secrets manager), a different account with minimal permissions for each purpose, and immediate rotation of any credential that showed up where it should not have.

Before and after this lab

To unlock it you must have solved:

It is one of the final labs: no other lab requires it.

The Web Exploitation path

Web Exploitation brings the basics into the world of websites and web applications, where a huge share of real attacks happen. You explore invented sites with HTTP requests from the terminal and discover folders someone hoped to hide, cookies the server trusts too much, factory credentials never changed, comments forgotten in the page source and error messages that say too much. The lessons follow the OWASP Top 10 categories, such as Broken Access Control and authentication failures, and each one explains the fix.

All labs in the Web Exploitation path

Learn more with the guides

All guides