Skip to content
PURPLEDUEL

The old API that is still on

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

The customer portal API moved from version 1 to version 2 with a nice announcement: "v1 is deprecated". But does deprecated mean switched off? Read the documentation, use the test key you were given and check what the service really answers.

Lab 10 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:

  • Read the API documentation (60 XP)
  • Query the current version with the test key (100 XP)
  • Find out that the deprecated version still answers (200 XP)
  • Find in the old version a key that should not be there (200 XP)

Topics: web, api, versioni, owasp-a01.

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

v2 was well protected (key, roles, masked personal data), but v1, "deprecated" and never switched off, answered with no checks at all and even returned the key of an administrative account: there is no need to force the new door if the old one is open. Deprecating is not decommissioning. Defense: a shutdown calendar for old versions that is actually kept, with monitoring of who still calls them; the same authentication and authorisation checks applied at gateway level to every version; never keys in clear in responses; immediate rotation of any key that appeared where it should not have, and an inventory of all exposed endpoints.

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