Reverse-Engineering Upload Names to Win an IDOR Bug
An image download endpoint used predictable filenames composed of a sequential numeric ID, a username string, and a Unix timestamp, allowing an attacker to enumerate and download other users' uploaded images. The attacker could access any user's image by guessing these filename components.
medium.com
Published on medium.com
Hello, I’m KaziSabbir (0xNOXON) Two days before a physics exam I ditched studying and went hunting -.- called up my friend Shafayat Ahmed Alif to look for a good target after an hour we got one. With our automated recon running in the background, we dropped the target (redacted.com) into Burp and
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
The application used predictable, sequential identifiers and timestamps in filenames without proper access control checks, allowing enumeration of other users' files.
Impact
An attacker could download other users' uploaded images, leading to mass data exposure of potentially sensitive documents.
What the attacker needed
A free account; ability to upload an image; knowledge of filename pattern
How it was found
- Create an account and upload an image to observe the filename pattern.
- Notice the filename structure: a sequential numeric ID, a username string, and a Unix timestamp.
- Write a script to enumerate sequential IDs and generate timestamps around plausible upload times.
- Send requests with generated filenames to test for valid responses.
- Download other users' images when a valid filename is found.
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.
When you upload a file, the website gives it a name. If that name is easy to guess, like a number that goes up by one each time, someone else can try those names and download your files. This is called an insecure direct object reference (IDOR), where the site doesn't check if you're allowed to see the file you're asking for.
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.