Skip to content
IDOR Write-up Intermediate

Medical Exploitation: You Are Now Diabetic

The mobile app for a glucometer used weak certificate pinning, an IDOR on a userID parameter, and hardcoded AES key and IV, letting an attacker decrypt and modify any user's stored data. An attacker could read and tamper with other users' glucometer readings, potentially misleading medical staff.

depthsecurity.com

Published on depthsecurity.com

A few months ago, our CTO and hacker-in-chief, Jake Reynolds, bought a glucometer online along with all the necessary stuff to make it work. He thought it would make for an interesting project, as researching this device and its related infrastructure could help improve security in a worthwhile field: health / medical…

Faisal Tameesh, on depthsecurity.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 backend trusted a client-supplied userID for authorisation, and the app shipped a static AES key and IV plus weak certificate pinning, so encrypted data offered no real protection.

Impact

An attacker could read and modify any user's stored glucometer data, which, if relied on by medical staff, could cause serious issues with predicting and managing a patient's prognosis.

What the attacker needed

A free account; jailbroken iPhone or rooted Android device; ability to proxy app traffic

The fix

The vendor fixed the vulnerabilities within the 90-day responsible disclosure period and informed users.

How it was found

  1. Bypass certificate pinning on a jailbroken iPhone or rooted Android device and proxy app traffic with Burp Suite.
  2. Create two test accounts and note their user IDs.
  3. Change the numeric userID parameter in the request and observe a different encrypted response.
  4. Decompile the Android app, find the decrypt methods, and recover the static AES key and IV.
  5. Decrypt responses to read other users' data, then re-encrypt modified data and send it from the second account.
  6. Retrieve the first user's data again to confirm the change was stored.

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 glucometer is a device that measures blood sugar, and it sent readings to a phone app and then to a cloud service. The app protected data with encryption, but the key was hidden inside the app itself, so anyone who downloaded the app could find it. The server also trusted a number in the request to decide whose data to return or change, so changing that number let one account touch another person's records.

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.

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.