Skip to content
Account takeover Write-up Advanced

Analysis of Satisfyer Toys: Discovering an Authentication Bypass with r2 and Frida

The Android app generated and signed its own JWTs using a static signing key embedded in a native library, and the same key was used for both anonymous and authenticated roles. An attacker who extracted the key could forge a token for any user account and impersonate that user, including reading their friends list and controlling their device remotely.

bananamafia.dev

Published on bananamafia.dev

radare2 r2 frida r2frida reverse-engineering web vulnerability

The author, on bananamafia.dev

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 server accepted JWTs signed with a client-side key that was shared between anonymous and authenticated roles, instead of using a server-only key for authenticated tokens.

Impact

An attacker could impersonate any user, read their friends list, send messages as them, and potentially hijack remote sessions to control another person's device; changing the victim's password would not help.

What the attacker needed

The app installed and a device to run it; ability to hook the app with Frida; a valid account to search for the victim; the victim's account name

How it was found

  1. Extract the JWT signing key from the native library, either statically with radare2 or dynamically with Frida.
  2. Look up the victim's user ID through the account search API endpoint using a valid session.
  3. Hook the app's JWT builder with Frida to change the auth claim to the user role, add the victim's user ID, and set the subject to the victim's account name.
  4. Generate the forged token and inject it into the app's local storage before the token check runs.
  5. Use the forged token to act as the victim, for example changing their status message or messaging their friends.

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.

The app made its own login passes (tokens) and signed them with a secret that was hidden inside the app itself. Because the same secret was used for normal users too, anyone who pulled it out of the app could write a pass claiming to be someone else. The server trusted those passes, so the attacker could act as the victim.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.