Summary of an article published on The Web Scraping Club on 2026-07-16 (for paid subscribers). Read the full article

Shopee is one of those targets where every route seems open until you actually try it. Strip the anti-fraud headers from any captured API request and replay it, and the backend answers with error code 90309999. The protection is carried by two headers attached by okhttp interceptors in the Android app, and generated by libshpssdk.so, a 4.7 MB native library whose real logic hides behind a bytecode interpreter rather than readable primitives.

I tried the native library, the JSON API behind the website, and everything in between, and I map each wall here. The signer registers only at runtime via RegisterNatives, so we hook that with Frida and find the one JNI method that matches a request signer. Porting it would mean reversing a whole VM, on the level of DroidGuard, so instead we drive the app’s own code through an RPC oracle that signs any request we choose. Then we test what those headers can actually survive: replays from outside the app, and requests made from inside it.

What’s inside

  • Why the base64-looking values in the signature can’t be reproduced with a standard HMAC-SHA1 and encoder.
  • What the structure of x-sap-ri reveals about how the token is bound to a specific request sequence.
  • Why the antifraud layer sits among okhttp’s network interceptors, not the application interceptors.
  • The af-ac-enc-sz-token session header: its pipe-delimited fields and what is computed once per session.

In the full article: The Frida agent and drivers (oracle, replay, crash trace), the header analysis script and its output, the captured header values, the Ghidra findings at the signer’s offset, the replay results, and the GitHub repository with the code.

Read the full article on The Web Scraping Club