| name | exploiting-insecure-data-storage-in-mobile |
| description | Identifies and exploits insecure local data storage vulnerabilities in Android and iOS mobile applications including unencrypted databases, world-readable files, insecure SharedPreferences, plaintext credential storage, and improper keychain/keystore usage. Use when performing mobile penetration testing focused on OWASP M9 (Insecure Data Storage) or assessing compliance with MASVS-STORAGE requirements. Activates for requests involving mobile data storage security, local storage exploitation, SharedPreferences analysis, or mobile data leakage assessment.
|
| domain | cybersecurity |
| subdomain | mobile-security |
| author | mahipal |
| tags | ["mobile-security","android","ios","data-storage","owasp-mobile","penetration-testing"] |
| version | 1.0.0 |
| license | Apache-2.0 |
Exploiting Insecure Data Storage in Mobile
When to Use
Use this skill when:
- Assessing whether mobile applications store sensitive data securely on the device filesystem
- Testing for credential leakage through SharedPreferences, SQLite databases, or plists
- Evaluating keychain/keystore implementation for proper access control attributes
- Performing data-at-rest security assessment during mobile penetration tests
Do not use this skill on production user devices without authorization -- data extraction techniques require physical access or root/jailbreak privileges.
Prerequisites
- Rooted Android device or emulator with ADB access
- Jailbroken iOS device with SSH access or Objection-patched IPA
- ADB (Android Debug Bridge) for Android filesystem access
- SQLite3 CLI for database inspection
- Frida/Objection for runtime data extraction
- Target application installed and exercised (logged in, data cached)
Workflow
Step 1: Map Application Data Storage Locations
Android storage paths:
/data/data/<package_name>/
├── shared_prefs/
├── databases/
├── files/
├── cache/
├── lib/
└── app_webview/
/sdcard/Android/data/<package_name>/
adb shell run-as <package_name> ls -la /data/data/<package_name>/
iOS storage paths:
/var/mobile/Containers/Data/Application/<UUID>/
├── Documents/
├── Library/
│ ├── Preferences/
│ ├── Caches/
│ └── Application Support/
└── tmp/
Step 2: Extract and Analyze SharedPreferences (Android)