Other people’s invoices
The customer portal of the building firm Edil Verdi lets everyone look up their own invoices. You have a test account for an authorised check: find out whether the portal really verifies that an invoice belongs to whoever asks for it.
Lab 8 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, 40 and 100 XP.
What you learn
Objectives complete themselves while you work in the terminal; each one is worth experience points:
- Log into the portal with the test account (80 XP)
- Open your own invoice (70 XP)
- Open another customer’s invoice by changing the number (200 XP)
Topics: web, autorizzazione, idor, 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:
The portal checked that you were logged in, but not that the invoice was yours: changing the number in the address showed other customers’ invoices, down to a test invoice left in the system. This is the first item of the OWASP list (A01, broken access control): authentication says who you are, authorisation says what you may see, and it must be checked for every single object. Defense: on every request the server compares the object’s owner with the session’s user (and answers the same way whether it does not exist or is not yours); non-sequential identifiers are an extra, not a substitute; automated authorisation tests for every endpoint, logging and alerts for anyone walking through numbers in sequence, and no test data in production.
Before and after this lab
To unlock it you must have solved:
- The manufacturer's manual (Web Exploitation, medium)
After this lab you can move on to:
- The old API that is still on (Web Exploitation, hard)
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.