Skip to content
Access control Write-up Advanced

How I Stole an AI’s Brain (Legally) and Cashed Out

An internal prediction API returned 403 to outsiders but accepted requests carrying a spoofed forwarding header, letting the author call a proprietary image classifier. By querying it with many images and recording the answers, the author trained a clone model that matched the original on most test images.

iski Follow

Published on medium.com

Free link 🎈

Iski, 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.

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 API trusted a client-supplied forwarding header to decide the request came from an internal or cloud address, instead of authenticating callers properly.

Impact

An outsider could call the internal model and, by collecting its outputs, build a clone that reproduced its predictions closely, exposing the company's core technology and possibly memorised training data.

What the attacker needed

No account needed; network access to the API host; ability to send many automated requests

The fix

The endpoint should authenticate and authorise callers itself rather than trusting forwarding headers, and should limit how much detail and volume of predictions it returns.

How it was found

  1. Find internal-looking API hosts through subdomain and archive enumeration.
  2. Request the prediction endpoint directly and observe a 403 response.
  3. Fuzz request headers, including forwarding headers, until the endpoint returns 200.
  4. Send images and read the returned labels and confidence scores.
  5. Script thousands of queries to build a shadow dataset of inputs and outputs.
  6. Train a clone model and compare its predictions with the original API.

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 company's internal prediction service was meant to be reachable only from inside its own network. The author added a header that made the request look like it came from a trusted address, so the service answered. Because the service returned detailed confidence scores, the author could collect thousands of question-and-answer pairs and train a copy of the model.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.