Skip to content
Misconfiguration Write-up Beginner

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.

tanish.saxena26 Follow

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.

Tanish Saxena, on medium.com

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

  1. Obtain the APK file of the target Android app, for example by using an emulator or downloading from a third-party site.
  2. Use ADB to list packages and find the full path of the APK, then pull the APK from the device.
  3. Decompile the APK using Apktool to extract its contents.
  4. Search the strings.xml file in the res/values folder for a Firebase URL.
  5. Visit the Firebase URL followed by /.json to check if it returns data or null (vulnerable) or 'Permission denied' (secure).
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.