Flutter Hackers Uncovering The Devs Myopia Part 2
A Flutter Android APK was built in release mode without obfuscation, so the Dart snapshot retained readable class, field and function names. The author used a patched Flutter engine to dump those symbols and their code offsets, then located a hardcoded encrypted super-user credential and developer-mode path that exposed personal data.
In the previous post, I’ve introduced how the relations between Dart and Flutter are correlated each other and also one of the mistake on how the Developer should’ve spotted on their application building phase. If you haven’t read about it, I’d recommend you to read it first especially if you’ve never heard about this…
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 release build was made without the obfuscation flag and the app shipped a hardcoded privileged credential that the client, rather than the server, checked.
Impact
An attacker with the APK could reach a developer mode and view numerous pieces of personal data belonging to users.
What the attacker needed
Possession of the release APK; ability to run a patched Flutter engine
The fix
The app should be built with obfuscation and split debug info, and privileged access should be checked server-side with a unique token instead of a hardcoded credential.
How it was found
- Build or obtain the Flutter APK in release mode without obfuscation.
- Decompile the APK and locate the libapp.so snapshot library.
- Patch the Flutter engine with reFlutter and run the patched APK to produce a dump of classes and code offsets.
- Use the dumped offsets with the snapshot base offset to find the validation routine.
- Recover the hardcoded encrypted credential and enter developer mode to view personal data.
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 phone app is a package of compiled code, and if the developer does not scramble the names inside it, anyone who downloads the app can read those names. Here the app also stored a privileged password inside the package itself. Someone who unpacks the app can find that password and use it to reach a hidden admin area holding other people's personal details.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.