Hunting for Firebase Enums in Android Application
Two Android apps had Firebase databases with insecure security rules, allowing unauthenticated read and write access. An attacker could enumerate and modify data in these databases.
Published on medium.com
A few weeks back I was doing bounty hunting on Android apps, I came across two mobile applications (apps) that were vulnerable to Firebase enumeration.
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
Impact
An attacker could read and write arbitrary data in the Firebase database, potentially exposing or altering sensitive information.
What the attacker needed
Target Android app uses Firebase; Firebase security rules are misconfigured
The fix
The Firebase security rules should be configured to require authentication and restrict access to authorised users only.
How it was found
- Obtain the APK file of the target Android app, for example by using an emulator or downloading from a third-party site.
- Use ADB to list packages and find the full path of the APK, then pull the APK from the device.
- Decompile the APK using Apktool to extract its contents.
- Search the strings.xml file in the res/values folder for a Firebase URL.
- Visit the Firebase URL followed by /.json to check if it returns data or null (vulnerable) or 'Permission denied' (secure).
- If vulnerable, send a POST request to a test path to write data, then visit that path to confirm the write.
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.
Firebase is a backend service from Google that apps use to store data. If its security rules are not set correctly, anyone can read or write to the database without logging in. This post shows how to find such misconfigured Firebase databases in Android apps.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.