Skip to content

Commit e827fa6

Browse files
dguidoclaude
andauthored
Add firebase-apk-scanner skill for auditing Firebase in APKs (trailofbits#21)
* Reapply "Add firebase-apk-scanner skill for auditing Firebase in APKs" This reverts commit 555a17c. * Fix shellcheck and shfmt lint errors in scanner.sh - Convert spaces to tabs for consistent indentation (shfmt) - Add shellcheck disable for intentionally unused CYAN color variable - Remove unused manifest_proj variable - Replace for loops over find with while read loops (SC2044) - Separate local declarations from assignments (SC2155) - Replace sed calls with parameter expansion where possible (SC2001) - Fix printf format string to avoid variable interpolation (SC2059) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address code review feedback for firebase-apk-scanner - Rename .claude_plugin/ to .claude-plugin/ to match convention - Add plugin to root README.md under new "Mobile Security" category - Change skill name from firebase-scan to firebase-apk-scanner for consistency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix shfmt formatting in burp-search.sh Convert spaces to tabs in case statement for consistent formatting. This fixes a pre-existing CI failure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix shfmt formatting to use 2-space indentation per CI config CI runs `shfmt -i 2 -ci` (2-space indent with case indentation). Reformat both shell scripts to match. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix remaining shellcheck warnings in scanner.sh - SC2015: Replace `A && B || C` with proper if-then-else - SC2002: Remove useless cat, pass file directly to jq Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add disable-model-invocation to prevent automatic triggering This skill makes external HTTP requests and performs security testing, so it should only run when explicitly invoked via /firebase-apk-scanner. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f8775bb commit e827fa6

File tree

6 files changed

+2509
-0
lines changed

6 files changed

+2509
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ cd /path/to/parent # e.g., if repo is at ~/projects/skills, be in ~/projects
6868
|--------|-------------|
6969
| [dwarf-expert](plugins/dwarf-expert/) | Interact with and understand the DWARF debugging format |
7070

71+
### Mobile Security
72+
73+
| Plugin | Description |
74+
|--------|-------------|
75+
| [firebase-apk-scanner](plugins/firebase-apk-scanner/) | Scan Android APKs for Firebase security misconfigurations |
76+
7177
### Development
7278

7379
| Plugin | Description |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "firebase-apk-scanner",
3+
"version": "2.1.0",
4+
"description": "Scan Android APKs for Firebase security misconfigurations including open databases, storage buckets, authentication issues, and exposed cloud functions. For authorized security research only.",
5+
"author": {
6+
"name": "Nick Sellier",
7+
"email": "",
8+
"url": ""
9+
}
10+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Firebase APK Security Scanner
2+
3+
Scan Android APKs for Firebase security misconfigurations including open databases, exposed storage buckets, and authentication bypasses.
4+
5+
## When to Use
6+
7+
Use this skill when you need to:
8+
- Audit Android applications for Firebase misconfigurations
9+
- Test Firebase endpoints extracted from APKs (Realtime Database, Firestore, Storage)
10+
- Check authentication security (open signup, anonymous auth, email enumeration)
11+
- Enumerate Cloud Functions and test for unauthenticated access
12+
- Perform mobile app security assessments involving Firebase backends
13+
14+
## When NOT to Use
15+
16+
- Scanning apps you do not have explicit authorization to test
17+
- Testing production Firebase projects without written permission
18+
- When you only need to extract Firebase config without testing (use manual grep/strings instead)
19+
- For non-Android targets (iOS, web apps) - this skill is APK-specific
20+
- When the target app does not use Firebase
21+
22+
## What It Does
23+
24+
This skill automates Firebase security testing for Android applications. When invoked, Claude will:
25+
26+
- **Decompile** the APK using apktool
27+
- **Extract** Firebase configuration from all sources (google-services.json, XML resources, assets, smali code, DEX strings)
28+
- **Test** authentication endpoints for misconfigurations
29+
- **Probe** Realtime Database and Firestore for open read/write access
30+
- **Check** Storage buckets for public listing and upload vulnerabilities
31+
- **Enumerate** Cloud Functions and test accessibility
32+
- **Generate** detailed reports with findings and remediation guidance
33+
34+
## Key Features
35+
36+
- Supports native Android, React Native, Flutter, and Cordova apps
37+
- Extracts config from 7+ sources including raw DEX binary strings
38+
- Tests 14 distinct vulnerability categories
39+
- Automatic cleanup of test data created during scans
40+
- Detailed vulnerability reference documentation included
41+
42+
## Installation
43+
44+
```
45+
/plugin install trailofbits/skills/plugins/firebase-apk-scanner
46+
```
47+
48+
## Prerequisites
49+
50+
Install required dependencies before use:
51+
52+
**macOS:**
53+
```bash
54+
brew install apktool curl jq binutils
55+
```
56+
57+
**Ubuntu/Debian:**
58+
```bash
59+
sudo apt install apktool curl jq unzip binutils
60+
```
61+
62+
## Usage
63+
64+
```
65+
/firebase-scan ./app.apk
66+
/firebase-scan ./apks/
67+
```
68+
69+
Or run the standalone script directly:
70+
71+
```bash
72+
./scanner.sh app.apk
73+
./scanner.sh ./apks/ --no-cleanup
74+
```
75+
76+
## Vulnerability Categories
77+
78+
| Category | Tests | Severity |
79+
|----------|-------|----------|
80+
| **Authentication** | Open signup, anonymous auth, email enumeration | Critical/High/Medium |
81+
| **Realtime Database** | Unauthenticated read/write, auth token bypass | Critical/High |
82+
| **Firestore** | Document access, collection enumeration | Critical/High |
83+
| **Storage** | Bucket listing, unauthenticated upload | Critical/High |
84+
| **Cloud Functions** | Unauthenticated access, function enumeration | Medium/Low |
85+
| **Remote Config** | Public parameter exposure | Medium |

0 commit comments

Comments
 (0)