Corridor
The web page used predictable MD5 hashes of small numbers as URL endpoints for its rooms, so the hashes could be cracked back to the numbers. An attacker could then request a hash for a number not linked in the page and reach a hidden page containing the flag.
medium.com
Published on medium.com
Writeup for Corridor room at Tryhackme. Corridor room can be found here: https://tryhackme.com/room/corridor
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the site relied on unguessable-looking hashes of small sequential numbers instead of proper access checks to hide pages.
Impact
An attacker could reach a hidden page that was not linked anywhere, exposing the flag; the text does not claim any wider access.
What the attacker needed
Access to the web page; ability to run curl and a hash cracker
How it was found
- Open the site and click a door to see the picture URL containing a hash.
- Download the page source with curl and collect the hashes.
- Identify the hash type as MD5.
- Crack the hashes with John the Ripper to recover the numbers.
- Generate an MD5 hash for a number not already used, such as 14 or 0.
- Put that hash in the URL to reach a hidden page.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A hash is a short fingerprint of some data; here the site turned each room number into a fingerprint and put it in the web address. Because the numbers were tiny, the author could guess every possible number, hash it, and compare. That let them build the address of a page the site never linked to.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.