iOS applications store data in several locations — some secure by default, others frequently misused. This guide covers how to locate, extract, and assess data stored by iOS apps.
iOS App Container Structure
# App container (accessible on jailbroken device) /var/mobile/Containers/Data/Application/<UUID>/ ├── Documents/ # User data, iCloud-backed ├── Library/ │ ├── Application Support/ # App data not shown to user │ ├── Caches/ # Ephemeral cached data │ ├── Preferences/ # NSUserDefaults (.plist files) │ └── Saved Application State/ ├── SystemData/ └── tmp/ # Temporary files, purged on relaunch
# Find app UUID find /var/mobile/Containers/Data/Application/ -name "*.app"2>/dev/null # Or use objection: objection -g com.target.app explore # Then: env (shows all container paths)
NSUserDefaults — Plist Files
NSUserDefaults stores key-value data in plist format — commonly misused for sensitive data:
# What to check: # - Does the app allow copying passwords from password fields? # - Is OTP / 2FA code placed on clipboard? # - Are auth tokens copied to clipboard?
Testing with objection
# Connect to running app objection -g com.target.app explore
# View environment paths env
# Dump NSUserDefaults ios nsuserdefaults get
# Dump Keychain items ios keychain dump
# List files in app container ls ls -la /path/to/dir
# Download a file for offline analysis file download /path/to/database.sqlite ./local_copy.sqlite
# Check for pasteboard usage ios monitor pasteboard
Data Storage Assessment Checklist
NSUserDefaults: [ ] No passwords or tokens stored inNSUserDefaults [ ] NoPII stored unencrypted in preferences plist
Keychain: [ ] Sensitive credentials use kSecAttrAccessibleWhenUnlocked minimum [ ] kSecAttrAccessibleAlways not used [ ] kSecAttrSynchronizable not enabled for sensitive items (excludes from iCloud backup)
SQLite / CoreData: [ ] No plaintext passwords in database [ ] SQLCipher or equivalent used if database contains sensitive data [ ] WAL file doesn't expose sensitive data after normal deletion
Files: [ ] No sensitive data in tmp/ or Caches/ (canbeclearedbyOS) [ ] Documents/ doesn't contain unencrypted sensitive files [ ] iCloud backup exclusion applied to sensitive data (NSURLIsExcludedFromBackupKey)
Logging: [ ] No sensitive data written to NSLog or os_log [ ] No sensitive data in crash logs
Clipboard: [ ] Password fields have UITextFieldSecureTextEntry (auto-blocks copy in most cases) [ ] App clears clipboard after use if sensitive data was placed there
Screenshots: [ ] App uses UIScreen.main.isCaptured or sets secure flag on sensitive views [ ] Snapshot on backgrounding doesn't expose sensitive screen
No comments yet. Be the first.