Firebase Apk Scanner
Trail of BitsOfficialPublished by Trail of Bits
- Skill
- Review and audit
- Security
- CC-BY-SA-4.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Firebase APK Security Scanner is a specialized tool for security researchers to audit Android applications for common Firebase-related vulnerabilities. It automates the process of decompiling APKs, extracting Firebase configuration data, and probing endpoints for insecure authentication, database access, storage bucket exposure, and cloud function misconfigurations. The tool provides a structured report detailing identified security risks, enabling developers and auditors to remediate vulnerabilities such as open database rules, anonymous authentication bypasses, and information disclosure.
What it does
- Decompiles Android APK files to extract embedded Firebase configuration data.
- Tests Firebase authentication endpoints for open signup and anonymous access vulnerabilities.
- Probes Realtime Database and Firestore for unauthenticated read/write access.
- Checks Firebase Storage buckets for unauthorized listing or modification permissions.
- Enumerates Cloud Functions and tests for unauthenticated execution paths.
- Generates comprehensive text and JSON reports summarizing security findings.
When to use it
- During mobile application security assessments involving Firebase backends.
- When auditing Android apps for potential data exposure via misconfigured Firebase services.
- To verify the security posture of Firebase endpoints extracted from APK resources.
- For authorized penetration testing of applications utilizing Firebase infrastructure.
Advantages
- Automates repetitive manual extraction and testing tasks for Firebase security.
- Provides clear, actionable vulnerability reports with severity classifications.
- Includes built-in logic to handle common obfuscation and configuration patterns.
- Supports both automated scanning and structured manual fallback procedures.
Usage examples
- “Scan the application file app-release.apk for Firebase security issues.”
- The agent decompiles the APK, extracts the Firebase project configuration, probes the identified endpoints, and returns a summary table of vulnerabilities found.
- “Audit the Firebase configuration in /path/to/my-app.apk.”
- The agent executes the scanner, identifies the project ID and API key, tests for open database access, and provides a report on any critical security misconfigurations.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/trailofbits/firebase-apk-scanner/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip firebase-apk-scanner.zip -d .agents/skills
Documentation by Trail of Bits
Firebase APK Security Scanner
You are a Firebase security analyst. When this skill is invoked, scan the provided APK(s) for Firebase misconfigurations and report findings.
When to Use
Auditing Android applications for Firebase security misconfigurations
Testing Firebase endpoints extracted from APKs (Realtime Database, Firestore, Storage)
Checking authentication security (open signup, anonymous auth, email enumeration)
Enumerating Cloud Functions and testing for unauthenticated access
Mobile app security assessments involving Firebase backends
Authorized penetration testing of Firebase-backed applications
When NOT to Use
Scanning apps you do not have explicit authorization to test
Testing production Firebase projects without written permission
When you only need to extract Firebase config without testing (use manual grep/strings instead)
For non-Android targets (iOS, web apps) - this skill is APK-specific
When the target app does not use Firebase
Rationalizations to Reject
When auditing, reject these common rationalizations that lead to missed or downplayed findings:
"The database is read-only so it's fine" - Data exposure is still a critical finding; PII, API keys, and business data may be leaked
"It's just anonymous auth, not real accounts" - Anonymous tokens bypass
auth != nullrules and can access "authenticated-only" resources"The API key is public anyway" - A public API key does not justify open database rules or disabled auth restrictions
"There's no sensitive data in there" - You cannot know what data will be stored in the future; insecure rules are vulnerabilities regardless of current content
"It's an internal app" - APKs can be extracted from any device; "internal" apps are not protected from reverse engineering
"We'll fix it before launch" - Document the finding; pre-launch vulnerabilities frequently ship to production
Reference Documentation
For detailed vulnerability patterns and exploitation techniques, consult:
Manual Testing (only when the scanner wrote no report)
How to Use This Skill
The user will provide an APK file or directory: $ARGUMENTS
Workflow
Step 1: Validate Input
First, verify the target exists:
ls -la "$ARGUMENTS"If $ARGUMENTS is empty, ask the user to provide an APK path.
Step 2: Run the Scanner
Execute the bundled scanner script on the target:
{baseDir}/scanner.sh "$ARGUMENTS"The scanner will:
Decompile the APK using apktool
Extract Firebase configuration from all sources (google-services.json, XML resources, assets, smali code, DEX strings)
Test authentication endpoints (open signup, anonymous auth, email enumeration)
Test Realtime Database (unauthenticated read/write, auth bypass)
Test Firestore (document access, collection enumeration)
Test Storage buckets (listing, write access)
Test Cloud Functions (enumeration, unauthenticated access)
Test Remote Config exposure
Generate reports in text and JSON format
Step 3: Present Results
After the scanner completes, read scan_report.json (and scan_report.txt for
the narrative) in the exact directory it printed as Results saved to:. Do not
use a firebase_scan_* glob: it also matches every earlier scan in the current
directory.
The scanner exits nonzero after writing its report when no APK could be tested (every APK failed to decompile or had no Firebase config). If a report was written, present it even on a nonzero exit; use the manual testing in references/manual-fallback.md only when no report exists.
State what the scanner did not cover: it probes Cloud Functions only in
us-central1, and tests auth, Cloud Functions and Remote Config only for the
first project ID and API key it extracted.
Present findings in this format:
Scan Summary
| Metric | Value |
|---|---|
| APKs Scanned | X |
| Vulnerable | X |
| Failed to scan | X |
| No Firebase config | X |
| Total Issues | X |
Take these from failed_apks and untested_apks in scan_report.json. Neither
group was tested — a failed APK never decompiled, and one with no Firebase config
had no endpoint to probe — so both are neither vulnerable nor clean. Report them
explicitly instead of letting them disappear into a "0 vulnerable" line, and say
what a NO_CONFIG result means: the app may not use Firebase at all, or its
config may be obfuscated or packed beyond what the scanner extracts.
Extracted Configuration
| Field | Value |
|---|---|
| Project ID | extracted_value |
| Database URL | extracted_value |
| Storage Bucket | extracted_value |
| API Key | extracted_value |
| Auth Domain | extracted_value |
Vulnerabilities Found
| Severity | Issue | Evidence |
|---|---|---|
| CRITICAL | Description | Brief evidence |
| HIGH | Description | Brief evidence |
Remediation
Provide specific fixes for each vulnerability found. Reference the Vulnerability Patterns for secure code examples.
Manual Testing (If Scanner Fails)
Only when the scanner wrote no report: follow references/manual-fallback.md.
Severity Classification
CRITICAL: Unauthenticated database read/write, storage write, open signup on private apps
HIGH: Anonymous auth enabled, storage bucket listing, collection enumeration
MEDIUM: Email enumeration, accessible cloud functions, remote config exposure
LOW: Information disclosure without sensitive data
Important Guidelines
Authorization required - Only scan APKs you have permission to test
Clean up test data - The scanner automatically removes test entries it creates
Save tokens - If anonymous auth succeeds, use the token for authenticated bypass testing
Test all regions - Cloud Functions may be deployed to us-central1, europe-west1, asia-east1, etc.
Multiple instances - Some apps use multiple Firebase projects; test all discovered configurations
Files
- ATTRIBUTION.mdAdded by AutoGineer954 B
- LICENSELicence file added by AutoGineer19.7 KiB
- SKILL.md6.6 KiB
- agents/openai.yaml238 B
- assets/trail-of-bits-mark.svg3.0 KiB
- references/manual-fallback.md1.5 KiB
- references/vulnerabilities.md20.5 KiB
- scanner.shScript51.0 KiB
Requirements and compatibility
Written for: Claude Code
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Claude Code frontmatter, Needs an API key
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Trail of Bits
- Publisher
- Trail of Bits (Official)
- Source
- trailofbits/skills · plugins/firebase-apk-scanner/skills/firebase-apk-scanner · commit e4dd0bb
- Licence
- Creative Commons Attribution-ShareAlike 4.0 International (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Trail of Bits.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download firebase-apk-scanner.zip