Skip to content
IDOR Write-up Intermediate

The API Was Never Invisible

An API endpoint returned full project metadata for any project ID supplied, without checking whether the authenticated user had any relationship to that project. An attacker could use another account's project ID to retrieve that account's name, internal identifier, and creation timestamps.

medium.com

Published on medium.com

Cybersecurity

Lh1l0v3, on medium.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

This is an account of a reconnaissance-led assessment of an SMS API platform. The application let businesses send SMS, and new users had to complete an onboarding flow before they were approved to send: fill in business details, upload verification documents, submit for review, and wait for approval. That flow implies several things worth noting up front: the application has multiple states, it handles uploaded files, it almost certainly has authorization checks around whose data is whose, and there is a review process whose reviewers have to trust that what they are shown is accurate.

The assessment started with a URL and permission to test freely. There was no rules of engagement document listing in-scope endpoints and no API documentation. The author's working premise is that this is the normal case, and that even when documentation exists, what it says and what the application does are not always the same thing. The first question is therefore not which endpoint to attack but what the application does and how it does it.

The author estimates that about 70% of application testing is reconnaissance, framed explicitly as a feeling about the work rather than a figure from a study, with exploitation usually the shorter part.

From the original on medium.com

Setup

No special tooling was needed beyond a browser and its developer tools. The method was:

  1. Use the application as a normal user before sending any modified request, to understand the full surface: what functionality exists, what requires authentication, what flows a new user goes through, where user-controlled data enters the system, and which operations are sensitive from a business logic perspective.
  2. Open the application with DevTools running in the background and complete every distinct user workflow end to end.
  3. Export the full session as a HAR file.

A HAR (HTTP Archive) file is a JSON record of every HTTP request and response in that browser session: URL, method, request headers, request body, response status and response body. Every call the frontend made to the backend ends up in one file. The reasoning is that the frontend has to talk to the backend regardless of whether documentation exists, so every dynamic page, form submission and button is evidence of an API call, and observable calls can be reconstructed into an API inventory.

The HAR was then given to Claude with a request to extract the API surface: which endpoints were called, which methods were used, which parameters appeared in request bodies, what the authentication mechanism looked like, and what the response shapes were. The output became the working endpoint inventory: which routes existed, what each expected, what a normal successful response looked like, and which endpoints mattered from a security standpoint, namely those touching other users' data, accepting file uploads, managing authorization state, or where changing a single parameter might change what you were allowed to see.

Testing was done with curl throughout, deliberately, so that every finding in the report had a reproduction step another person could copy and run without a particular proxy setup or browser state. A curl command is text that states the method, URL, headers and body explicitly.

Finding it

The endpoint inventory is treated as a set of questions rather than findings. For each endpoint the question was whether it behaves as it should when given input it was not expecting: who is authorized to call it and does the server actually verify that; what happens when an ID in the path or a parameter in the query string is changed to someone else's; what a file upload endpoint actually rejects; and what happens when a required field is omitted or sent outside the expected range.

The application had multiple user accounts operating independently, so the most important question was whether each endpoint scoped its results to the authenticated user. For most endpoints it did. One did not.

The project read endpoint returned full project metadata for any project ID supplied, regardless of whether the authenticated session had any relationship to that project. Supplying another account's project ID returned that account's name, internal account identifier and creation timestamps. The endpoint that read the project's member list correctly returned 401 for the same request, so the parent resource had no equivalent check.

The file upload surface raised a separate set of questions, tested against the business-document upload used in verification: whether file type validation happened server-side or only in the browser, whether a size limit was enforced on the backend, whether filenames were stored and rendered anywhere, and whether a replacement document could be uploaded after an application had already been submitted for review.

Exploitation

Step 1: Reconstruct the API from the HAR

A request from the endpoint inventory looked like this in the HAR:

HTTP
GET /v1/sms/onboarding/status/{projectId}Host: api.[target].comCookie: access_token=[token]; refresh_token=[token]

This is the baseline request: it shows what a normal, authenticated call looks like.

Step 2: Test the project read endpoint across accounts

Turning the baseline into a test meant substituting Account 2's session cookie and pointing the request at Account 1's project ID. The result either confirms the authorization check exists or it does not: two commands, one comparison, clear outcome.

The project read endpoint returned Account 1's project metadata to Account 2's session, including the account name, internal account identifier and creation timestamps. The member list endpoint for the same project returned 401 under the same conditions, which is what made the gap on the parent resource visible.

Step 3: Test the file upload surface

The upload tests produced the following results:

Test Result
HTML file upload Rejected with a clear error
10MB file upload 413 response
Word document upload Accepted and stored on the CDN in its original format
Second upload of the same document type to an application already under review Accepted, silently overwriting the file on the CDN while the database record kept the original timestamp

The Word document result is not about Word documents being inherently dangerous. It is that a reviewer downloading the file to check its contents opens an editable Office format, which carries a different risk profile from a PDF. The overwrite result gives the attack chain: submit a legitimate document to pass the intake check, then replace it after submission.

Step 4: Document every finding reproducibly

Every finding in the final report had the baseline request showing normal behaviour, the attack request showing the one changed variable, and the full response. False positives were documented the same way, so another person could read the report, run each command and verify independently.

Root cause

The project read endpoint did not check that the authenticated session had any relationship to the requested project before returning its metadata. The member list endpoint on the same resource returned 401 for the same request, so the parent resource had no equivalent check. The report does not describe the implementation, so the precise reason the check was omitted is not stated.

On the upload side, type validation rejected HTML and a backend size limit returned 413 for a 10MB file, so some server-side controls existed. The application accepted a Word document and accepted a replacement upload after submission for review. The database record kept the original timestamp while the file on the CDN was overwritten.

Impact

An authenticated user could read another account's project metadata, including its name, internal account identifier and creation timestamps, by supplying that account's project ID. The report does not describe any further use of the leaked identifier.

On the upload side, a legitimate document could pass the intake check and then be replaced after submission, so a reviewer could open content that was not the content originally submitted. The report frames this as a risk to the reviewer rather than as a direct compromise of the platform.

Fix

Based on the findings, the project read endpoint should apply the same ownership check that the member list endpoint already performs, returning 401 or 403 for projects unrelated to the session. The upload flow should restrict accepted formats to what reviewers can open safely, and should reject replacement uploads once an application is under review, or at minimum keep the stored file and the database record consistent.

Variants to test

  1. Sibling endpoints on the same resource. Where one endpoint on a resource returns 401 for a foreign ID, test every other endpoint on that resource with the same ID. A positive result is metadata returned for a resource the session has no relationship to.
  2. Nested identifiers. Change IDs in paths and query strings to a second account's values across the whole inventory. A positive result is any response that differs from the 401 or 403 the endpoint should return.
  3. Upload format handling. Submit HTML, Office formats and PDFs and check what is stored and in what format. A positive result is an editable format stored and served back to a reviewer.
  4. Post-submission replacement. Upload a second document of the same type after submission and compare the stored file with the database record. A positive result is a silent overwrite with an unchanged timestamp.
  5. Client-side-only validation. Bypass browser-side checks and send the request directly. A positive result is server acceptance of input the browser would have blocked.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 23 min read.

What happened, in plain words

A security tester was given a web application to test. The only thing they received was a web address and permission to look around freely. Nobody handed them a list of the parts of the application they were allowed to test, and nobody gave them documentation describing how the application's internal plumbing works.

The application was a platform that lets businesses send text messages (SMS). Before a new business can send messages, it has to go through a sign-up process: enter business details, upload documents that prove who they are, submit everything for review, and wait to be approved.

The tester's approach was to first use the application like an ordinary customer would, watching everything the browser did in the background. Then they saved a complete record of all that background traffic into a single file, and used an AI assistant to turn that record into a map of the application's hidden internal services. With that map in hand, they tested each part methodically.

Two problems turned up. First, one part of the application would hand over another business's project details to anyone who asked, as long as they knew that business's project number. Second, the document upload accepted a replacement document after it had already been submitted for review, overwriting the stored file while the database record kept the original timestamp.

This article walks through the whole thing from the beginning, assuming you have never done security testing before. Every term is explained the first time it appears.

The starting point

The tester had posted on X (formerly Twitter) that they had read an article about pulling out an application's hidden interfaces without any documentation, and had used the technique on a real assessment. They promised to write up their process.

Their working estimate is that about 70% of application testing is reconnaissance. They are clear that this is not a number from a study; it is just how the work feels to them. The actual exploitation, the part where you try to break something, is usually the shorter part.

From the original on medium.com

Reconnaissance means exploring and mapping something before you touch it. Think of a burglar who first walks around a building noting every door, window, camera and locked gate before trying any of them. In security testing, reconnaissance is the mapping phase: learning what the application does, what it talks to, and where the interesting parts are.

Exploitation is the phase where you actually try to make something behave in a way it should not, for example by sending a request the developer did not expect.

Someone gave the tester an application with no rules of engagement document listing which parts were in scope. Just a URL and permission to assess it freely and report what they found.

The tester points out that this is a normal starting point. Most applications you meet during an assessment will not hand you perfectly documented APIs. And even when documentation exists, what the documentation says and what the application actually does are not always the same thing.

So the first question is never "which endpoint do I attack?" It is "what does this application do, and how does it do it?"

An endpoint is a specific address inside an application that accepts requests and does something in response. If the application were a restaurant, the menu items would be the endpoints: each one is a thing you can ask for, at a particular address, and it returns a particular dish. In web terms, an endpoint is usually a URL path plus a method (such as GET or POST) that the server understands.

An API (Application Programming Interface) is the set of endpoints a program exposes so that other programs can talk to it. The website you see in your browser is one program; the server behind it is another. The API is the agreed language and address list the two use to communicate. A useful comparison: a restaurant's kitchen is the API. You do not walk into the kitchen and cook; you place an order through a waiter using the menu's names and numbers, and food comes back. The menu is the API documentation, and the waiter is the network connection.

Understanding the application before touching it

Before sending a single request, the tester spent time using the application as a normal user. They note that this sounds obvious but many people skip it: they open a proxy, turn on interception, and start modifying requests before they understand what they are looking at.

A proxy is a tool that sits between your browser and the internet and lets you see and edit every request and response that passes through. Interception means the proxy pauses each request so you can change it before it is sent.

The tester wanted to understand the full surface before poking at any part of it. The questions they asked themselves were:

  • What functionality exists?
  • What requires authentication?
  • What flows does a new user go through?
  • Where is user-controlled data entering the system?
  • Which operations are sensitive from a business logic perspective?

Authentication is how an application knows who you are. Logging in with a username and password is authentication. Authorisation is a separate question: now that the application knows who you are, what are you allowed to do and see? A helpful comparison is a hotel. Authentication is showing your passport at reception and getting a key card. Authorisation is which doors that key card opens: your own room, yes; the room next door, no.

User-controlled data is any information that comes from the user and goes into the application: form fields, file names, numbers in a URL. It matters because attackers control it, so it is where unexpected input can enter.

Business logic means the rules of the application as a business defines them, rather than the technical rules of the code. For example, "a document cannot be replaced after review has started" is a business rule. A bug in business logic is when the application technically works but breaks one of those rules.

The application was an SMS API platform. New users had to complete an onboarding flow to get approved for SMS sending: fill in business details, upload verification documents, submit for review, wait for approval.

That one piece of information tells the tester several things immediately:

  1. There are multiple states an application can be in (for example, draft, submitted, approved).
  2. There are files being handled.
  3. There are probably authorisation checks around whose data is whose.
  4. There is a review process that someone on the backend has to trust is showing them accurate information.

That model of the application is what the tester tries to build before anything else. Not a list of URLs, but a picture of what the application does and where the interesting decisions happen.

Why you can map an API without documentation

Here is the core idea that makes reconnaissance possible even without documentation.

The frontend still has to communicate with the backend. Every page that loads dynamic data, every form that submits, every button that does something is evidence of an API call. Those calls are observable. If you can observe them, you can reconstruct the API yourself.

The frontend is the part of the application that runs in your browser: the pages, buttons and forms you see. The backend is the part that runs on the server: the database, the business rules, the actual work. The frontend cannot do the work alone; it must ask the backend for data and tell the backend what to change. Every one of those conversations is a request that your browser sends and a response it receives.

The application owner does not need to give you documentation. The application already documents itself through its own behaviour.

A comparison: imagine a building with no floor plan. You can still draw one by walking every corridor and noting every door. The building reveals its own layout as you move through it. In the same way, the browser reveals the API as you use the application.

Building the map with a HAR file

The way the tester did this was straightforward:

  1. Open the application with DevTools running in the background.
  2. Go through the entire user workflow end to end.
  3. Complete every distinct flow the application had.
  4. Export the full session as a HAR file.

DevTools (developer tools) are the built-in panel in every modern browser, usually opened with F12 or by right-clicking and choosing Inspect. Among other things, they contain a Network tab that lists every request the page makes.

A HAR file (HTTP Archive) is a JSON record of every HTTP request and response that happened in that browser session. It contains the URL, the method, the request headers, the request body, the response status and the response body. Every call the frontend made to the backend ends up in one file.

JSON is a plain-text format for structured data, made of names and values in curly braces. HTTP is the language browsers and servers use to exchange requests and responses. A header is a small piece of extra information attached to a request or response, such as what type of content is being sent or who is logged in. A request body is the main content of a request, for example the fields of a form. A response status is a three-digit number saying how the request went, such as 200 for success or 401 for not allowed.

Why do it this way? Because doing it by hand, request by request in the Network tab, is slow and error-prone. You would be scrolling through hundreds of entries and writing them down. Exporting the whole session into one file and handing it to a tool is faster and more complete.

Turning the HAR into an endpoint inventory

Then the tester fed that file to Claude.

Instead of going through the network tab request by request and building the inventory by hand, they gave the full session to Claude and asked it to extract the API surface: what endpoints were called, what methods were used, what parameters appeared in the request bodies, what the authentication mechanism looked like, what the response shapes were.

A parameter is a named value sent with a request, for example projectId=123. The authentication mechanism is the way the application proves who you are on each request, such as a cookie or a token. The response shape is the structure of what comes back: which fields, in what arrangement.

The output became the working endpoint inventory. The tester now knew:

  • what routes existed;
  • what each one expected;
  • what a normal successful response looked like;
  • which endpoints were doing things that mattered from a security standpoint.

The endpoints that mattered were the ones that touched other users' data, the ones accepting file uploads, the ones that managed authorisation state, and the ones where modifying a single parameter might change what you were allowed to see.

From that inventory, the tester could build a deliberate test plan instead of guessing at what to look for.

An endpoint list is not a finding. It is a set of questions.

The questions to ask of every endpoint

For each endpoint mapped, the question was the same: does this behave the way it should when you give it input it was not expecting? That breaks down into specific things to check:

  1. Who is authorised to call this, and does the server actually verify that?
  2. If there is an ID in the path or a parameter in the query string, what happens when you change it to someone else's ID?
  3. If the endpoint accepts a file, what does it actually reject?
  4. If there is a required field, what happens when you omit it or send something outside the expected range?

A path is the part of a URL after the domain, for example /v1/sms/onboarding/status/123. A query string is the part of a URL after a question mark, made of name and value pairs, for example ?id=123.

The application had multiple user accounts operating independently, so the most important question was whether each endpoint correctly scoped its results to the authenticated user. For most endpoints, it did. One did not.

Scoping results to the authenticated user means the server only returns data belonging to the person who is logged in. If you are logged in as Business A, you should only ever see Business A's data, no matter what you ask for.

The first finding: reading another account's project

The project read endpoint returned full project metadata for any project ID you supplied, regardless of whether the authenticated session had any relationship to that project. You could give it another account's project ID and get back that account's name, internal account identifier and creation timestamps.

Metadata is data about data: not the main content, but the descriptive details around it. For a project, that might be its name, its internal identifier and when it was created.

The endpoint that read the project's member list correctly returned 401 for the same request. The parent resource had no equivalent check.

401 is the HTTP status code for "unauthorised": the server is saying you are not allowed to see this. The parent resource is the main object that other things belong to. Here, the project is the parent, and its member list is a child of it. The child was protected; the parent was not.

That finding only exists if you have done the reconnaissance to know the endpoint is there, understand what it should return, and then test it with a second account's session against the first account's resource. Without the map, you are guessing at what to look for and you will miss things because you did not know they existed.

This class of bug is often called IDOR (Insecure Direct Object Reference): the application takes an identifier supplied by the user and uses it to fetch an object without checking that the user is allowed to access that object. The everyday comparison is a cloakroom that hands out any coat to anyone who reads out a ticket number, without checking whether the ticket belongs to the person asking.

The second area: file uploads

The file upload surface produced a different set of questions. The application accepted business documents for a verification process. The tester checked:

  • whether file type validation happened server-side or only in the browser;
  • whether there was a size limit enforced on the backend;
  • whether filenames were stored and rendered anywhere;
  • whether you could upload a replacement document after an application had already been submitted for review.

Server-side validation means the server itself checks the file. Client-side validation means only the browser checks it, for example by greying out a button or refusing to select a file type. Client-side checks are easy to bypass because the attacker controls the browser; server-side checks are the ones that actually protect anything. The comparison is a nightclub with a bouncer at the door versus a sign on the wall saying "no entry". The sign is client-side; the bouncer is server-side.

A CDN (Content Delivery Network) is a network of servers around the world that store and serve files quickly to users. When the report says a file was stored on the CDN, it means the uploaded file was placed on that storage and served from there.

The results were:

  • HTML files were rejected with a clear error.
  • A 10MB file came back 413.
  • A Word document was accepted and stored on the CDN in its original format.

413 is the HTTP status code for "payload too large": the server is refusing the upload because it exceeds a size limit.

The issue is not that Word documents are inherently dangerous. The issue is that a reviewer downloading that file to check its contents is opening an editable Office format, which carries a different risk profile than a PDF. The report says an editable Office format carries a different risk profile than a PDF.

The application also accepted a second upload of the same document type to an application already under review, silently overwriting the file on the CDN while the database record kept the original timestamp. Submit a legitimate document to pass the intake check, then replace it after submission. That is the attack chain.

An attack chain is a sequence of steps that, taken together, achieve something none of the steps could achieve alone. Here, step one is passing the check with a harmless document; step two is swapping it for something else once the check is over.

A timestamp is a record of when something happened. The database kept the original timestamp while the file on the CDN was overwritten. The record and the file disagreed.

Why curl for every test

The tester used curl for every test and was deliberate about that.

curl is a command-line tool for sending HTTP requests. You type a command, press Enter, and the response is printed as text. It has no graphical interface, which is exactly the point: the command itself is a complete, readable description of the request.

The main reason was the report. The tester wanted every finding to have a reproduction step that another person could copy and run without needing a specific proxy setup or a browser state they had to recreate. A curl command is text. It says exactly what it is doing: the method, the URL, the headers, the body. Anyone reading the report can run it in under a minute.

A reproduction step is the exact set of actions someone else can follow to see the same result. Good reports always include one, because a finding nobody can reproduce is a finding nobody can trust.

The baseline request

A request from the endpoint inventory looked like this in the HAR:

HTTP
GET /v1/sms/onboarding/status/{projectId}Host: api.[target].comCookie: access_token=[token]; refresh_token=[token]

Line by line, in plain words:

  • GET is the method: it means "give me this information" without changing anything. Other common methods are POST (create something), PUT (replace something) and DELETE (remove something).
  • /v1/sms/onboarding/status/{projectId} is the path. It says: version 1 of the API, the SMS section, the onboarding part, the status page, for a particular project. The {projectId} is a placeholder for the actual project number.
  • Host: api.[target].com says which server the request is addressed to. The api. prefix suggests this is the API subdomain, separate from the main website.
  • Cookie: access_token=[token]; refresh_token=[token] carries the session. A cookie is a small piece of data the server asks your browser to store and send back with every request. It is how the server recognises you between requests. A token is a string of characters that acts like a temporary key: whoever holds it is treated as logged in. The comparison is a wristband at a festival: you show it at every gate, and it proves you paid, without you having to show your ticket again.

This is the baseline request: it shows what a normal, authenticated call looks like. A baseline matters because you cannot tell what is unusual until you know what is normal.

Testing the project read endpoint across accounts

Turning that baseline into a test meant substituting in Account 2's session cookie and pointing it at Account 1's project ID. The result either confirms the authorisation check exists or it does not. Two commands, one comparison, clear outcome.

Why this works: if the server checks ownership, Account 2 asking for Account 1's project should be refused. If it does not check, Account 2 gets Account 1's data. You do not need to guess; you just compare the two responses.

The project read endpoint returned Account 1's project metadata to Account 2's session, including the account name, internal account identifier and creation timestamps. The member list endpoint for the same project returned 401 under the same conditions, which is what made the gap on the parent resource visible.

That contrast is the heart of the finding. The same project, the same session, two endpoints: one refused, one answered. The member list endpoint returned 401 for the same request, while the project read endpoint answered.

Testing the file upload surface

The upload tests produced the following results:

Test Result
HTML file upload Rejected with a clear error
10MB file upload 413 response
Word document upload Accepted and stored on the CDN in its original format
Second upload of the same document type to an application already under review Accepted, silently overwriting the file on the CDN while the database record kept the original timestamp

The Word document result is not about Word documents being inherently dangerous. It is that a reviewer downloading the file to check its contents opens an editable Office format, which carries a different risk profile from a PDF. The overwrite result gives the attack chain: submit a legitimate document to pass the intake check, then replace it after submission.

Notice what the tests show together. The application rejected HTML files and returned 413 for a 10MB file. What it lacked was a restriction on the accepted document format and any state check preventing replacement after submission. The controls that existed made the missing ones easy to overlook.

Documenting every finding reproducibly

Every finding in the final report had three parts:

  1. The baseline request showing normal behaviour.
  2. The attack request showing the one changed variable.
  3. The full response.

Every false positive was documented the same way. A false positive is something that looked like a bug but turned out not to be one. Documenting those too means another person can read the report, run each command and verify independently, including verifying that the things that looked suspicious really are harmless.

Why go to this trouble? Because a report is a communication, not a trophy. Its job is to let someone else see exactly what you saw, using the same steps, and reach the same conclusion.

Why the bugs existed

The project read endpoint returned metadata for any project ID supplied, regardless of the session's relationship to it. The member list endpoint returned 401 for the same request, so the parent resource had no equivalent check. The report does not describe the implementation, so the precise reason the check was omitted is not stated.

On the upload side, type validation rejected HTML and a backend size limit returned 413 for a 10MB file, so some server-side controls existed. The application accepted a Word document and accepted a replacement upload after submission for review. The database record kept the original timestamp while the file on the CDN was overwritten.

A state check means checking what stage something is in before allowing an action. For example, "only allow edits while the application is in draft state". Without it, an action that should only be possible early can be done at any time.

What the impact was

An authenticated user could read another account's project metadata, including its name, internal account identifier and creation timestamps, by supplying that account's project ID. The report does not describe any further use of the leaked identifier.

On the upload side, a legitimate document could pass the intake check and then be replaced after submission, so a reviewer could open content that was not the content originally submitted. The report frames this as a risk to the reviewer rather than as a direct compromise of the platform.

Impact is what an attacker could actually do with the bug, and to whom. It is the difference between "a door was unlocked" and "anyone could walk into the room where the safe is kept".

What the fix would be

Based on the findings, the project read endpoint should apply the same ownership check that the member list endpoint already performs, returning 401 or 403 for projects unrelated to the session. 403 is the HTTP status code for "forbidden": the server understood who you are but refuses to let you do this.

The upload flow should restrict accepted formats to what reviewers can open safely, and should reject replacement uploads once an application is under review, or at minimum keep the stored file and the database record consistent.

Variants to test

These are the generalised lessons: the same kinds of checks applied to other applications.

  1. Sibling endpoints on the same resource. Where one endpoint on a resource returns 401 for a foreign ID, test every other endpoint on that resource with the same ID. A positive result is metadata returned for a resource the session has no relationship to.
  2. Nested identifiers. Change IDs in paths and query strings to a second account's values across the whole inventory. A positive result is any response that differs from the 401 or 403 the endpoint should return.
  3. Upload format handling. Submit HTML, Office formats and PDFs and check what is stored and in what format. A positive result is an editable format stored and served back to a reviewer.
  4. Post-submission replacement. Upload a second document of the same type after submission and compare the stored file with the database record. A positive result is a silent overwrite with an unchanged timestamp.
  5. Client-side-only validation. Bypass browser-side checks and send the request directly. A positive result is server acceptance of input the browser would have blocked.

Sibling endpoints are other endpoints that belong to the same object. If the project has a read endpoint and a member list endpoint, those are siblings. Nested identifiers are IDs inside IDs, for example a project ID inside a URL that also contains a document ID.

The lesson

The thing this assessment reinforced for the tester is that missing documentation is not actually a problem. It is a different starting point.

When documentation exists, you read it and verify whether the application matches what it says. When it does not exist, you observe how the application behaves and build the documentation yourself from the HAR. The second path takes more time upfront, but it often gives you a more accurate picture of the real surface. Developers document what they intended. The HAR shows what they built.

Reconnaissance is where you build the map. The map is what makes the rest of the assessment deliberate. With it, you can work through the surface systematically and know when you have covered it.

The API was never invisible. The frontend was talking to it the whole time.

Glossary

  • API (Application Programming Interface): the set of addresses and rules a program exposes so other programs can talk to it; the menu the frontend orders from.
  • Attack chain: a sequence of steps that together achieve something none of the steps could alone.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: what you are allowed to do or see once the application knows who you are.
  • Backend: the part of an application that runs on the server and does the real work.
  • Baseline request: a normal, expected request used as a comparison point for tests.
  • Business logic: the rules of the application as the business defines them, rather than the technical rules of the code.
  • CDN (Content Delivery Network): a network of servers that store and serve files quickly to users.
  • Client-side validation: checks performed only in the browser, which an attacker can bypass.
  • Cookie: a small piece of data the server asks the browser to store and send back with each request, used to recognise you.
  • curl: a command-line tool for sending HTTP requests and printing the responses as text.
  • DevTools: the built-in developer panel in a browser, including a Network tab that lists every request.
  • Endpoint: a specific address inside an application that accepts requests and does something in response.
  • Exploitation: the phase of testing where you try to make something behave in a way it should not.
  • False positive: something that looked like a bug but turned out not to be one.
  • Frontend: the part of an application that runs in your browser: pages, buttons, forms.
  • HAR file (HTTP Archive): a JSON record of every request and response in a browser session.
  • Header: a small piece of extra information attached to a request or response.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • IDOR (Insecure Direct Object Reference): a bug where an identifier supplied by the user is used to fetch an object without checking the user is allowed to access it.
  • Impact: what an attacker could actually do with a bug, and to whom.
  • Interception: pausing a request in a proxy so it can be inspected or changed before it is sent.
  • JSON: a plain-text format for structured data, made of names and values.
  • Metadata: data about data; descriptive details such as a name, identifier or creation time.
  • Method: the verb of an HTTP request, such as GET (fetch), POST (create), PUT (replace) or DELETE (remove).
  • Parameter: a named value sent with a request, for example projectId=123.
  • Parent resource: the main object that other objects belong to, such as a project whose member list is a child.
  • Path: the part of a URL after the domain, for example /v1/sms/onboarding/status/123.
  • Proxy: a tool that sits between browser and internet and lets you see and edit traffic.
  • Query string: the part of a URL after a question mark, made of name and value pairs.
  • Reconnaissance: exploring and mapping an application before testing it.
  • Reproduction step: the exact actions someone else can follow to see the same result.
  • Request body: the main content of a request, such as form fields.
  • Response shape: the structure of what comes back from a request: which fields, in what arrangement.
  • Response status: a three-digit number saying how a request went, such as 200 (success), 401 (unauthorised), 403 (forbidden) or 413 (payload too large).
  • Scoping results to the authenticated user: only returning data that belongs to the person who is logged in.
  • Server-side validation: checks performed by the server itself, which an attacker cannot bypass from the browser.
  • Sibling endpoints: other endpoints that belong to the same object.
  • State check: checking what stage something is in before allowing an action.
  • Timestamp: a record of when something happened.
  • Token: a string of characters acting as a temporary key; whoever holds it is treated as logged in.
  • User-controlled data: any information that comes from the user and enters the application.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.