| 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 |
| atlas_techniques | ["AML.T0057"] |
| nist_ai_rmf | ["MEASURE-2.7","MAP-5.1","MANAGE-2.4","GOVERN-1.1","GOVERN-4.2"] |
| nist_csf | ["PR.PS-01","PR.AA-05","ID.RA-01","DE.CM-09"] |
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.
Most Often Missed & How to Confirm
- Encryption key stored alongside ciphertext — testers flag an encrypted DB and stop. Confirm by checking SharedPreferences/plist/binary strings for the key and decrypting offline.
allowBackup="true" — often overlooked. Confirm with adb backup -f backup.ab <pkg>, unpack with ABE, and locate sensitive data in the archive.
- External / world-readable storage — confirm by reading
/sdcard/Android/data/<pkg>/ without root and grepping for tokens.
- iOS backup inclusion — files in
Documents/ are backed up by default. Confirm the absence of NSURLIsExcludedFromBackupKey on sensitive files.
- Logcat / NSLog leakage — confirm with
adb logcat -d | grep -iE "password|token|key" while exercising login.
- Clipboard exposure — confirm by copying a credential field and reading it from another app or via
ios pasteboard monitor.
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)
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
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> -la /data/data/<package_name>/