# Hacking Razer Pay Ewallet App

Razer Pay signed requests with a client-side MD5 signature; reverse engineering and Frida hooking let the researcher forge signatures and exploit IDORs to delete bank accounts and steal money.

- Payout: $6,000
- Severity: critical
- Program: Razer
- Credited: Richard Tan
- Disclosed: 2020-04-30
- Write-up quality: 7/10
- Original: https://blog.sambal0x.com/2020/04/30/Hacking-razer-pay-ewallet-app.html
- Library page: https://bugbountylibrary.com/r/blog%3Ablog-sambal0x-com-2020-04-30-hacking-razer-pay-ewallet-app-html
- Tags: domain:api domain:mobile impact:data-leak impact:funds-loss kind:bounty platform:blog sev:critical tech:android technique:reverse-engineering technique:source-review vuln:access-control vuln:business-logic vuln:idor

**Target:** Android e-wallet app API endpoints (/deleteBankAccount, chatgroup, transactions)
**Root cause:** Request integrity relied on a client-computed MD5 signature over parameters plus session token; since the algorithm lives in the APK, attackers can recompute valid signatures for tampered parameters, leaving endpoints without server-side authorization checks.
**Steps:**
1. Proxy app traffic with Burp; observe every GET/POST carries a signature field that blocks parameter tampering.
2. Decompile APK with apktool and inspect with Jadx-Gui; trace API endpoints to method `MD5Encode` in `com.mol.molwallet.view.MD5`.
3. Copy Java code into IntelliJ, fix obfuscation, and reproduce the signature offline for a known request to confirm the algorithm.
4. For `/deleteBankAccount`, compute signatures for a range of predictable bank `id` values and send the payload for a second owned account's id.
5. For other endpoints, hook `MD5Encode` with Frida: `MD5.MD5Encode.implementation = function(arg){ var r = this.MD5Encode("groupId=1x9&userIds=95xxx7&token=b6fxxxd3-..."); return this.MD5Encode(arg); }`.
6. Run `frida-server` on rooted device and `frida -l frida.js -U com.mol.molwallet`; browse app to capture freshly computed signatures for modified payloads.
7. Replay modified requests (e.g. add self to another chatgroup via `groupId`/`userIds`) with the Frida-derived signature.
**How found:** Noticed all requests were signed and untamperable; hypothesized developers relied on the signature instead of server-side authorization. Traced endpoints to `MD5Encode`, reproduced the algorithm offline to confirm, then pivoted to Frida hooking when other endpoints used different obfuscated algorithms.
**Exploitation:** Attacker with a rooted device hooks the signature method to obtain valid signatures for arbitrary parameter values, then sends IDOR requests: deleting other users' bank accounts, joining arbitrary chatgroups to read messages and claim shared red-packet money, and viewing/modifying other users' transaction and personal data.
**Escalation:** Chained signature-forgery primitive across many endpoints, escalating from single-account deletion to reading chat messages and stealing unclaimed group funds.
**Insight:** When a mobile app signs requests client-side, treat the signature as an oracle, not a control: hook the signing method with Frida to mint signatures for arbitrary parameters, then fuzz every signed endpoint for IDOR since devs often assume the signature enforces authorization.
