FI

firebase-apk-scanner

Security tool that identifies Firebase misconfigurations in APK files, such as exposed databases or weak authentication.

Install

mkdir -p .claude/skills/firebase-apk-scanner && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5279" && unzip -o skill.zip -d .claude/skills/firebase-apk-scanner && rm skill.zip

Installs to .claude/skills/firebase-apk-scanner

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Scans Android APKs for Firebase security misconfigurations including open databases, storage buckets, authentication issues, and exposed cloud functions. Use when analyzing APK files for Firebase vulnerabilities, performing mobile app security audits, or testing Firebase endpoint security. For authorized security research only.
329 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Inspects Android APKs for Firebase misconfigurations
  • Tests security rules for Realtime DB/Firestore
  • Identifies insecure Firebase storage bucket access
  • Detects exposed cloud function endpoints

How it works

Uses static analysis to extract Firebase configuration keys and probes endpoints for unauthenticated or insecure access patterns.

Inputs & outputs

You give it
Path to Android APK file
You get back
Security findings report on Firebase endpoints

When to use firebase-apk-scanner

  • Identify open Firebase databases in APKs
  • Test Firebase storage security rules
  • Detect exposed Firebase cloud functions
  • Audit mobile app authentication configurations

About this skill

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 != null rules 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:

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:

  1. Decompile the APK using apktool
  2. Extract Firebase configuration from all sources (google-services.json, XML resources, assets, smali code, DEX strings)
  3. Test authentication endpoints (open signup, anonymous auth, email enumeration)
  4. Test Realtime Database (unauthenticated read/write, auth bypass)
  5. Test Firestore (document access, collection enumeration)
  6. Test Storage buckets (listing, write access)
  7. Test Cloud Functions (enumeration, unauthenticated access)
  8. Test Remote Config exposure
  9. Generate reports in text and JSON format

Step 3: Present Results

After the scanner completes, read and summarize the results:

cat firebase_scan_*/scan_report.txt

Present findings in this format:


Scan Summary

MetricValue
APKs ScannedX
VulnerableX
Total IssuesX

Extracted Configuration

FieldValue
Project IDextracted_value
Database URLextracted_value
Storage Bucketextracted_value
API Keyextracted_value
Auth Domainextracted_value

Vulnerabilities Found

SeverityIssueEvidence
CRITICALDescriptionBrief evidence
HIGHDescriptionBrief evidence

Remediation

Provide specific fixes for each vulnerability found. Reference the Vulnerability Patterns for secure code examples.


Manual Testing (If Scanner Fails)

If the scanner script is unavailable or fails, perform manual extraction and testing:

Extract Configuration

Search for Firebase config in decompiled APK:

# Decompile
apktool d -f -o ./decompiled $ARGUMENTS

# Find google-services.json
find ./decompiled -name "google-services.json"

# Search XML resources
grep -r "firebaseio.com\|appspot.com\|AIza" ./decompiled/res/

# Search assets (hybrid apps)
grep -r "firebaseio.com\|AIza" ./decompiled/assets/

Test Endpoints

Once you have the PROJECT_ID and API_KEY:

Authentication:

# Test open signup
curl -s -X POST -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"Test123!","returnSecureToken":true}' \
  "https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=API_KEY"

# Test anonymous auth
curl -s -X POST -H "Content-Type: application/json" \
  -d '{"returnSecureToken":true}' \
  "https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=API_KEY"

Database:

# Realtime Database read
curl -s "https://PROJECT_ID.firebaseio.com/.json"

# Firestore read
curl -s "https://firestore.googleapis.com/v1/projects/PROJECT_ID/databases/(default)/documents"

Storage:

# List bucket
curl -s "https://firebasestorage.googleapis.com/v0/b/PROJECT_ID.appspot.com/o"

Remote Config:

curl -s -H "x-goog-api-key: API_KEY" \
  "https://firebaseremoteconfig.googleapis.com/v1/projects/PROJECT_ID/remoteConfig"

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

  1. Authorization required - Only scan APKs you have permission to test
  2. Clean up test data - The scanner automatically removes test entries it creates
  3. Save tokens - If anonymous auth succeeds, use the token for authenticated bypass testing
  4. Test all regions - Cloud Functions may be deployed to us-central1, europe-west1, asia-east1, etc.
  5. Multiple instances - Some apps use multiple Firebase projects; test all discovered configurations

When not to use it

  • When scanning applications without explicit legal authorization
  • When auditing non-Android platforms

Prerequisites

apktoolcurl

Limitations

  • Results are limited by the quality of extracted config
  • Cannot detect vulnerabilities hidden by server-side logic not in the client
  • False positives occur in misidentified Firebase implementations

How it compares

Automates the manual burden of decompiling APKs and verifying cloud security rules against specific Firebase backend risks.

Compared to similar skills

firebase-apk-scanner side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
firebase-apk-scanner (this skill)12moReviewAdvanced
security-header-generator59moCautionIntermediate
mobile-security143moReviewAdvanced
backend-security-coder243moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by trailofbits

View all by trailofbits

differential-review

trailofbits

Performs security-focused differential review of code changes (PRs, commits, diffs). Adapts analysis depth to codebase size, uses git history for context, calculates blast radius, checks test coverage, and generates comprehensive markdown reports. Automatically detects and prevents security regressions.

3115

code-maturity-assessor

trailofbits

Systematic code maturity assessment using Trail of Bits' 9-category framework. Analyzes codebase for arithmetic safety, auditing practices, access controls, complexity, decentralization, documentation, MEV risks, low-level code, and testing. Produces professional scorecard with evidence-based ratings and actionable recommendations.

416

modern-python

trailofbits

Configures Python projects with modern tooling (uv, ruff, ty). Use when creating projects, writing standalone scripts, or migrating from pip/Poetry/mypy/black.

427

semgrep-rule-creator

trailofbits

Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.

416

ton-vulnerability-scanner

trailofbits

Scans TON (The Open Network) smart contracts for 3 critical vulnerabilities including integer-as-boolean misuse, fake Jetton contracts, and forward TON without gas checks. Use when auditing FunC contracts.

410

cosmos-vulnerability-scanner

trailofbits

Scans Cosmos SDK blockchains for 9 consensus-critical vulnerabilities including non-determinism, incorrect signers, ABCI panics, and rounding errors. Use when auditing Cosmos chains or CosmWasm contracts.

32

Search skills

Search the agent skills registry