Skip to content
IDOR Write-up Beginner

$5000 Google IDOR Vulnerability Writeup

An IDOR vulnerability in Google Cloud's Dialogflow phone gateway allowed an attacker to delete another user's phone number by replacing the phone number identifier in a request. The attacker could brute-force the random string to delete victims' phone numbers.

Raidh Ĥere Follow

Published on asterfiester.medium.com

Bounty$5,000 View original

Raidh Ĥere

Raidh Ĥere, on asterfiester.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. 3 min read.

Context

Dialogflow is a natural language understanding platform used to design and integrate a conversational user interface into mobile apps, web applications, devices, bots, interactive voice response systems and related uses. The researcher found it while scrolling through the Google Cloud marketplace and chose it as a target after a run of duplicates and N/A results on HackerOne and Bugcrowd and an unsuccessful pass over Google subdomains found with Google dorks.

The feature that mattered was the phone gateway. It lets a user create a phone gateway and also offers a delete option for it. Deleting a gateway is the operation that turned out to be reachable for gateways belonging to other users.

again you need to clean up your mind raidh…. From the original on asterfiester.medium.com

Setup

The report does not describe the account, role or tool versions used. The workflow was a browser with an intercepting proxy in front of it, and Burp Repeater for replaying and editing requests. The researcher created a phone gateway and captured its delete request, then replayed it against other identifiers.

Finding it

The researcher began with the usual sweep for xss, sqli, htmli and similar bugs on the application, and none of it worked.

From the original on asterfiester.medium.com

What drew attention was the phone gateway option and, in particular, its delete function. The delete option stood out, so the proxy was turned on and the delete request was intercepted.

From the original on asterfiester.medium.com

Exploitation

Step 1: capture the delete request

With the proxy running, the researcher deleted a phone gateway and captured the resulting request. The report shows the request in a screenshot rather than as text.

From the original on asterfiester.medium.com

Step 2: swap the identifier

The captured request was sent to Burp Repeater and the phoneNumbers/<randomstring> portion of the path was replaced with the victim's <randomstring>, then the request was submitted again.

Because the identifier is a random string, the researcher notes that a wordlist of such strings can be built and used to brute force the vulnerability.

From the original on asterfiester.medium.com

Step 3: confirm the effect

The victim's number was deleted. A proof of concept was put together and reported to Google.

Root cause

The delete request succeeded against another user's identifier, which the report does not explain further.

Impact

The researcher deleted the victim's number by supplying that user's identifier in the delete request. The identifier is a random string, which limits blind guessing, but the researcher points out that a wordlist can be built and the request brute forced.

Fix

Google first closed the report as not reproducible, then as intended behaviour, then reopened and accepted it after the attacking scenario and impact were explained, and fixed it on Aug 28, 2021.

Variants to test

  1. Delete or modify endpoints for other per-user objects in the same product, such as agents, intents or integrations. A positive result is a request that succeeds against an identifier belonging to a second account you control.
  2. The same phoneNumbers/<randomstring> path with methods other than delete, for example a read or update. A positive result is a response containing or changing the other account's data.
  3. Identifier formats that are less random than they look, such as sequential or time-based values, on sibling features. A positive result is a small set of guesses reaching another account's object.
  4. The same pattern in other Google Cloud marketplace applications that expose per-user resources with client-supplied identifiers. A positive result is the same cross-account effect confirmed with two accounts.

Timeline

Date Event
May 4, 2021 06:28AM Reported
May 4, 2021 04:19PM Status: Won't Fix (Not Reproducible)
May 7, 2021 06:30PM Status: Won't Fix (Intended Behaviour)
May 12, 2021 09:10AM Status: Accepted (reopened)
May 18, 2021 04:20PM Rewarded $5000 bounty
Aug 28, 2021 01:29AM Fixed
ntended Behavior From the original on asterfiester.medium.com

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. 9 min read.

What happened, in plain words

A security researcher found a way to delete other people's phone numbers from a Google product called Dialogflow. Dialogflow is a service that lets you build a talking assistant, the kind of thing you might chat with in a mobile app or call on the phone. One of its features is a "phone gateway", which connects a phone number to your assistant so that people can ring it and talk to the bot.

That feature has a delete button. When you press delete, your browser sends a small message to Google's servers saying "please remove this phone gateway". The message includes an identifier, a short random-looking string that tells the server which gateway to remove. The researcher found that swapping the identifier for someone else's deleted their gateway. If you swapped your own identifier for someone else's, the server happily deleted their gateway.

This kind of mistake has a name: IDOR, short for Insecure Direct Object Reference. Think of a cloakroom where you hand in your coat and get a ticket with a number on it. If the attendant hands back whatever coat matches the number you say, without checking that the ticket is really yours, you can say someone else's number and walk off with their coat. Here the "ticket number" is the random string in the request, and the server was handing out deletions to anyone who named the right number.

Google first closed the report, saying the behaviour was intended. The researcher explained the attack and its impact more clearly, the report was reopened and accepted, and the researcher was paid $5000. The bug was fixed on Aug 28, 2021.

Background: what you need to know before the steps

A few ideas come up again and again below, so here they are from zero.

A web request. When you click a button on a website, your browser sends a message to a server. The message has a method (a verb such as GET to read something or POST to send something), an address (the URL), and often some data attached. The server reads it and sends back a response.

An API. Short for Application Programming Interface. It is the set of addresses and messages a website's own pages use to talk to its servers. The pages you see are built from these messages. If you can watch the messages, you can see exactly what the site is asking the server to do, and you can send your own versions.

A proxy. A program that sits between your browser and the internet and lets you read and edit every message that passes. The researcher used one, together with Burp Repeater, a tool that takes a captured request and lets you change it and send it again as many times as you like. You do not need to understand the tool to follow the story: it is just a way to pause a message, edit it, and press send.

An identifier. A name or number that points at one specific thing on a server, such as one user's phone gateway. If the server trusts whatever identifier the client sends, and does not check who owns that thing, you get an IDOR.

Brute force. Trying many guesses in a row, usually with a computer, until one works. It only helps if the guesses are cheap and the set of possible values is small enough.

A proof of concept (PoC). A small, repeatable demonstration that a bug is real, usually a few steps and screenshots that someone else can follow to see the same result.

The story before the bug

The researcher had spent time on HackerOne and Bugcrowd, getting many duplicates and N/A results. Many submissions came back as duplicates (someone else reported the same thing first) or N/A (not applicable, meaning the company did not consider it a valid bug). Looking for a fresh target, the researcher turned to Google.

The first attempt was to search for Google subdomains using Google dorks, which are clever search queries that make the search engine reveal pages it would not normally show. The researcher calls this approach weak, and it produced a few domains but nothing worked. The next stop was Google Cloud, Google's platform of online services, and its marketplace, a catalogue of applications you can switch on.

again you need to clean up your mind raidh…. From the original on asterfiester.medium.com

Scrolling through that marketplace, the researcher found Dialogflow. The report describes it as a natural language understanding platform used to design and integrate a conversational user interface into mobile apps, web applications, devices, bots, interactive voice response systems and related uses. In plain words: it is a toolkit for building a bot that understands what people type or say, and for plugging that bot into apps, websites, gadgets and phone lines.

Looking for the usual bugs first

The researcher started with the classic checks: xss (cross-site scripting, where you try to make a site run your own code), sqli (SQL injection, where you try to slip database commands into input), htmli (HTML injection, where you try to insert your own page markup) and similar.

From the original on asterfiester.medium.com

None of it worked.

Finding the phone gateway

After a lot of searching, one option stood out, and the researcher started creating a phone gateway.

From the original on asterfiester.medium.com

A phone gateway, as the name suggests, is the piece that connects a real telephone number to the bot. You create one, and the product gives you a delete option for it. That delete option is the interesting part: deleting something means the server has to be told which thing to delete, and that "which" is exactly where an IDOR lives.

Step 1: capture the delete request

The researcher turned on the proxy and started intercepting requests, then used the delete option and captured the message the browser sent. The report shows this request in a screenshot rather than as text.

From the original on asterfiester.medium.com

Why this step matters: you cannot tamper with a message you have not seen. Capturing the delete request tells you the exact address, the method and any data the site sends, and shows you where the identifier sits. In this case the identifier appears in the address itself, in a part shaped like phoneNumbers/<randomstring>, where <randomstring> stands for the random-looking value that names one particular gateway.

Step 2: swap the identifier

The captured request was sent to Burp Repeater, and the phoneNumbers/<randomstring> portion of the path was replaced with the victim's <randomstring>. The request was then submitted again.

In plain words: the researcher took the delete message and replaced the identifier with one belonging to somebody else. If the server had checked ownership, this edited message would have been refused. The whole test is that one substitution.

Because the identifier is a random string, the researcher notes that a wordlist of such strings can be built and used to brute force the vulnerability. A wordlist is simply a long list of candidate values; brute forcing means sending the request once per candidate until one is accepted. The report does not say how the identifier is generated or how many possible values there are, so it does not establish how practical that guessing would be in real life.

From the original on asterfiester.medium.com

Step 3: confirm the effect

The victim's number got deleted. That is the confirmation: the edited request deleted the victim's number. A proof of concept was put together and reported to Google.

What Google said, and what changed

Google first closed the report as not reproducible, then as intended behaviour, meaning the company's reading was that the product was supposed to work this way. The researcher then explained the attacking scenario and the impact, that is, who could do what to whom and why it mattered. Google reopened the report, accepted the bug, and paid a $5000 bounty.

ntended Behavior From the original on asterfiester.medium.com

Why the bug existed

The delete request succeeded against another user's identifier, which the report does not explain further. The behaviour is consistent with an object reference accepted from the client and used directly.

Impact

The researcher deleted the victim's number by putting that user's identifier into the delete request. The identifier is a random string, which makes blind guessing harder, but the researcher points out that a wordlist can be built and the request brute forced.

The fix

Google first closed the report as not reproducible, then as intended behaviour, then reopened and accepted it after the attacking scenario and impact were explained, and fixed it on Aug 28, 2021.

Variants to test

These are follow-up ideas in the same spirit, for anyone who wants to look for the same class of mistake elsewhere. Each one names what a positive result would look like.

  1. Delete or modify endpoints for other per-user objects in the same product, such as agents, intents or integrations. A positive result is a request that succeeds against an identifier belonging to a second account you control.
  2. The same phoneNumbers/<randomstring> path with methods other than delete, for example a read or update. A positive result is a response containing or changing the other account's data.
  3. Identifier formats that are less random than they look, such as sequential or time-based values, on sibling features. A positive result is a small set of guesses reaching another account's object.
  4. The same pattern in other Google Cloud marketplace applications that expose per-user resources with client-supplied identifiers. A positive result is the same cross-account effect confirmed with two accounts.

Timeline

Date Event
May 4, 2021 06:28AM Reported
May 4, 2021 04:19PM Status: Won't Fix (Not Reproducible)
May 7, 2021 06:30PM Status: Won't Fix (Intended Behaviour)
May 12, 2021 09:10AM Status: Accepted (reopened)
May 18, 2021 04:20PM Rewarded $5000 bounty
Aug 28, 2021 01:29AM Fixed

Glossary

  • API: the set of addresses and messages a website's own pages use to talk to its servers; watching them shows you what the site is really asking for.
  • Brute force: trying many guesses automatically until one works.
  • Bug bounty: a programme where a company pays people for reporting security problems to it.
  • Burp Repeater: a tool that takes a captured web request and lets you edit it and send it again.
  • Dialogflow: a Google platform for building conversational bots and connecting them to apps, websites, devices and phone lines.
  • Duplicate: a report of a bug that someone else already reported first.
  • Google Cloud: Google's platform of online services, including a marketplace of applications you can switch on.
  • Google dorks: crafted search queries that make a search engine reveal pages it would not normally show.
  • HackerOne / Bugcrowd: bug bounty platforms where researchers submit reports to companies.
  • HTML injection (htmli): slipping your own page markup into a site's input so it gets rendered.
  • Identifier: a name or number that points at one specific thing on a server, such as one user's phone gateway.
  • IDOR (Insecure Direct Object Reference): a bug where the server accepts an identifier from the client and acts on it without checking that the object belongs to that user.
  • Intercepting proxy: a program between your browser and the internet that lets you read and edit every message.
  • N/A: "not applicable"; a submission a company does not treat as a valid bug.
  • Phone gateway: the Dialogflow feature that connects a real phone number to a bot, and that can be created and deleted.
  • Proof of concept (PoC): a small, repeatable demonstration that a bug is real.
  • Request: the message a browser sends to a server, with a method, an address and sometimes data.
  • Response: the message a server sends back.
  • SQL injection (sqli): slipping database commands into a site's input so the database runs them.
  • Subdomain: a named part of a larger domain, such as a section of a company's website.
  • Wordlist: a long list of candidate values used for guessing.
  • XSS (cross-site scripting): making a site run code you supplied, usually in another user's browser.

More by Raidh Ĥere

View all

2 more disclosed reports, best first.

More from Google

View all

The newest disclosed reports for this program.

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.