Skip to content
Back to skills

Android Insecure Storage

ASecurity

Find sensitive data stored insecurely on-device — plaintext credentials, tokens, PII in shared_prefs, SQLite databases, files, external storage, and cache — via run-as/root, sqlite3, strings, and objection. Tier 1. Use after exercising app features. Aligns to OWASP MASTG MASVS-STORAGE (MASTG-TEST-0001).

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
securityshellsqltestingapidatabasebackend

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill android-insecure-storage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Insecure Storage?

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

Security grade badge for Android Insecure Storage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-android-insecure-storage/badge)](https://www.skillsdirectory.com/skills/anandjogawade-android-insecure-storage)

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-insecure-storage
description: Find sensitive data stored insecurely on-device — plaintext credentials, tokens, PII in shared_prefs, SQLite databases, files, external storage, and cache — via run-as/root, sqlite3, strings, and objection. Tier 1. Use after exercising app features. Aligns to OWASP MASTG MASVS-STORAGE (MASTG-TEST-0001).
---

# Android Insecure Data Storage

Trigger app features, then inspect every on-device storage location for plaintext secrets, tokens, and PII.

## Trigger phrases
`insecure storage, shared_prefs, sqlite, databases, external storage, sdcard, cache, run-as, objection explore, plaintext token on device`

## Method
1. **Exercise the app first** — log in, store a card, save notes, etc., so secrets are actually written.
2. **Enumerate storage locations:**
   - `/data/data/<package>/shared_prefs/`, `/databases/`, `/files/`, `/cache/`
   - `/sdcard/Android/data/<package>/` and `/sdcard/` (external — world-readable pre-scoped-storage).
3. **Inspect (root or debuggable app via `run-as`):**
   - `adb shell run-as <package> cat shared_prefs/*.xml`
   - `adb shell run-as <package> ls databases/`
   - `adb pull /data/data/<package>/databases/app.db && sqlite3 app.db ".tables" ".dump"`
   - `strings` over files/cache for residual secrets.
4. **objection** (no manual rooting of paths):
   ```
   objection -g <package> explore
   android > env                 # dumps app dirs
   android > sqlite connect <db>
   ```
5. **Check insecure modes** — `MODE_WORLD_READABLE`/`MODE_WORLD_WRITABLE` (grep decompiled code for `openFileOutput(... MODE_WORLD`), and sensitive residue in external storage/cache.

## Modern / rare techniques
- **EncryptedSharedPreferences / SQLCipher key recovery** — if "encrypted" storage is used but the key is derived in-app or keystore auth isn't bound, dump the key at runtime with Frida (`android-frida-objection-instrumentation`) and decrypt the store.
- **Debuggable app = no root needed:** `android:debuggable="true"` lets `run-as` read private data on a stock device.
- **External/scoped-storage residue:** check media/`Downloads` and app cache for exported secrets even when internal storage is clean.

## Escalation / chaining
Plaintext tokens/session → account takeover (feed into `android-backend-api-testing`); encrypted-at-rest with recoverable key → `android-crypto-keystore`; combine with `android-backup-extraction` for a non-root path to the same data.

## Backend & tooling
Preferred Kali path (native Kali / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike). Needs the user's rooted device/emulator (or debuggable app) + Kali tooling (adb/sqlite3/objection/strings). Windows-local last resort. See `zazy-orchestrator`.

## Verification (background, before reporting)
Reproduce the extraction independently (second pull, or a different storage path) and confirm the value is genuinely sensitive and live (e.g., the token still authenticates). Report true positives only.

## Evidence
The file/DB path, the plaintext secret (redacted), the insecure mode if any, and proof it is usable. Remediation: EncryptedSharedPreferences/SQLCipher with keystore-backed keys; keep sensitive data off external storage; clear cache; never world-readable modes.

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.