Hooking The Checkout How I Bypassed In App Purchases
An Android app built with Capacitor and a Cordova billing plugin never verified Google Play purchase receipts, and the verification method was dead code with no public key configured. An attacker with local access could use a Frida script to inject a fake purchase and force the consume and acknowledge callbacks to succeed, unlocking premium content without paying.
Published on systemweakness.com
There is a mental model that most developers carry when they integrate Google Play Billing, and it goes roughly like this: Google handles the money, Google runs the dialog, Google returns a receipt when the transaction succeeds, so the receipt must be legitimate by the time it reaches your code. The trust flows…
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
The app relied on Google Play to guarantee purchase integrity and never performed receipt signature verification in the native plugin, leaving the verification method unused and the public key unconfigured.
Impact
An attacker with local device access could unlock premium content without payment, and the app produced no log entries indicating anything unusual.
What the attacker needed
Local access to the Android device; ability to run Frida on the device; target app installed
The fix
The app should verify the receipt signature using the configured Google Play public key before accepting any purchase, and should not rely on the billing client response code alone.
How it was found
- Decompile the APK and inspect the Java plugin and bundled web assets.
- Check whether the billing public key string resource exists.
- Search for call sites of the receipt verification method.
- Search the source tree for any cryptographic signature verification logic.
- Attach a Frida script that hooks the purchase update callback and injects a fake purchase.
- Hook the consume and acknowledge callbacks to force success responses.
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.
When you buy something in an app, Google Play sends back a receipt with a cryptographic signature that the app is supposed to check. This app never checked it, so someone with a modified phone could tell the app 'the purchase succeeded' and get the paid content for free. Frida is a tool that lets a researcher change how a running app behaves.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.