Skip to content
PURPLEDUEL

Clues in the page code

Web Exploitation · medium level · 4 objectives · 550 XP in total

Pizzeria Vesuvio has a website for booking tables, built in a hurry by an optimistic developer. A web page is a document the server hands to anyone: read it in full, including the parts the browser does not show you.

Lab 5 of 7 in the Web Exploitation path. If you get stuck you have 3 hints, from the vaguest to the most precise: they cost 0, 40 and 120 XP.

What you learn

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

  • Read the source code of the home page (75 XP)
  • Open the JavaScript file the page points to (125 XP)
  • Reach the forgotten internal endpoint (150 XP)

Topics: web, information-disclosure, owasp-a05.

Commands you will use

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

  • 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:

  • SSH: encrypted remote command-line access; it is protected with keys instead of passwords and without direct root login.
  • 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:

Everything the server sends to the browser (HTML, comments, JavaScript) is public: the developer's comments and notes can be read by anyone, and an "internal" address that no page links to can still be reached by anyone who knows it. Hiding an address is not a defence (security through obscurity). Defensive lesson: clean comments and internal references out before going live, remove test endpoints from production and make every API go through authentication and server-side checks.

Before and after this lab

To unlock it you must have solved:

After this lab you can move on to:

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