Exploring A01: Broken Access Control – Insecure Direct Object References (IDOR) Vulnerability

 Insecure Direct Object References (IDOR) is a common security vulnerability that occurs when an application exposes direct access to internal objects, such as files, database records, or other system resources, without proper access control. This can lead to unauthorized users being able to access, modify, or delete sensitive data, potentially causing severe consequences for the system and its users.

IDOR vulnerabilities typically arise when developers implement insufficient or improper access controls on resources that are referenced by URL parameters, form fields, or other user-controlled inputs. Attackers can exploit these vulnerabilities by manipulating these inputs to gain unauthorized access to resources that they should not be able to access.

LAB Walkthrough

Objective:

Find the secret PDF and take note of the secret pdf ID!

Exploitation

Step 1 — Create a PDF (Initial interaction)

I created a PDF with the message secret via the app’s upload form.


i tried to create a pdf with the message secret as seen below 


after creating a pdf an id number was given to me as seen above which is "ID: 1489" so i tried the number and i got my pdf 


step 2: so i tried to brute force to see if i can access other document by fuzzing other index.



as seen in the image above i used the id=2000 and i got an interesting message saying "Pdf not found. Try with another id between 1 and 1500. ". I captured the request using Burp proxy to automate my fuzzing task.


After capturing the request i send it to intruder as seen below 



Then i start the attack and i got the result below 



So from the fuzzing request i found index "id =75" have a different response length from other index, so i tried it on the webpage and i found the secret pdf.


Findings & Impact

  • The app returns files by ID without verifying ownership classic IDOR.

  • An attacker can enumerate IDs to retrieve other users’ PDFs or files.

  • Impact ranges from information disclosure to exfiltration of sensitive documents.

Remediation

  1. Enforce authorization: on every file request, verify the requester is allowed to access that resource (e.g., check user ownership or ACL).

  2. Use indirect references: map internal IDs to unguessable tokens (GUIDs, random UUIDs) rather than sequential integers.

  3. Rate-limit enumeration: throttle repeated requests and implement anomaly detection for enumeration patterns.

  4. Log & monitor: unusual sequences of file requests should be alerted.

Comments

Popular posts from this blog

Using Hydra to Brute-Force SSH And WI-Fi Login Portal

Discover AWS Organization ID Via S3 Bucket

SMB Relay Attack in AD Lab (Step-by-Step)