iOS Acquisition and Analysis
Extracting and analyzing iOS data.
iOS Acquisition and Analysis is a free Cyber Security Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
iOS Security Model
iOS forensics is shaped by a tightly integrated hardware security model.
- Secure Enclave (SEP) — isolated coprocessor holding key material; passcode attempts are rate-limited in hardware.
- Data Protection — per-file encryption keys tied to the passcode and device UID.
- Sandboxing — each app confined to its own container.
This means brute-forcing a passcode is throttled by the SEP, and a raw flash dump is ciphertext. Lawful access usually relies on the device being cooperatively unlocked or in an AFU state.
Data Protection Classes
Every file is assigned a protection class that controls when its key is available.
- Complete — key wiped shortly after device locks (most protected).
- Complete Until First User Authentication — key available after first unlock (the common AFU default).
- No Protection — key always available (rare).
This is why AFU matters on iOS: files in the until-first-authentication class become readable, unlocking the bulk of user data.
iTunes/Finder Backup Acquisition
The most accessible logical method is a backup acquisition via the host pairing relationship (same mechanism as iTunes/Finder).
- Requires a valid pairing record (lockdown certificate) and an unlocked device to create one.
- An encrypted backup (backup password set) actually includes more data: keychain, health, and saved passwords.
Create a backup using libimobiledevice with proper authorization:
idevice_id -l # list connected UDIDs
ideviceinfo -k ProductVersion # confirm iOS version
idevicebackup2 backup --full ./ios_backup/Backup Structure and Manifest
An iOS backup does not store files by name. It hashes paths and stores them flat, indexed by a Manifest.db SQLite file.
- Manifest.db maps domain + relative path to the on-disk hashed filename.
- Info.plist / Status.plist hold device and backup metadata.
- Encrypted backups also require keychain key unwrapping with the backup password.
Locate a known artifact via the manifest:
sqlite3 -readonly Manifest.db \
"SELECT fileID, domain, relativePath FROM Files
WHERE relativePath LIKE '%sms.db%';"Full File System Extraction
A full file system (FFS) extraction goes beyond backup-allowed data to the entire user partition, including app caches, knowledge artifacts, and system databases.
- Requires an agent or exploit (e.g., checkm8-based on vulnerable older chips) and an AFU device.
- Captures artifacts backups exclude: knowledgeC.db, interactionC.db, location caches.
FFS is the gold standard for modern iOS analysis when lawfully obtainable, because it surfaces system behavioral databases invisible to a standard backup.
Core iOS Databases
iOS stores user activity in well-known SQLite databases inside app domains.
- sms.db — iMessage and SMS (table: message, handle).
- CallHistory.storedata — call logs.
- AddressBook.sqlitedb — contacts.
- Photos.sqlite — media metadata and asset links.
Query iMessage content (read-only) from an extraction:
sqlite3 -readonly sms.db
sqlite> SELECT datetime(date/1000000000 + 978307200,'unixepoch') ts,
...> h.id, m.text
...> FROM message m JOIN handle h ON m.handle_id=h.ROWID
...> ORDER BY m.date DESC LIMIT 20;Apple (Mac/Cocoa) Timestamps
iOS frequently uses Apple/Cocoa epoch time: seconds since 2001-01-01 UTC, not 1970. Some databases store it as nanoseconds.
- Offset to Unix epoch is 978307200 seconds.
- iMessage
dateis nanoseconds since 2001; divide by 1e9 then add the offset.
Misreading the epoch produces dates 31 years off. Conversion pattern:
-- Cocoa seconds -> UTC
SELECT datetime(ZDATE + 978307200, 'unixepoch') FROM ZRECORD;
-- iMessage nanoseconds -> UTC
SELECT datetime(date/1000000000 + 978307200, 'unixepoch') FROM message;Behavioral Databases
iOS keeps rich behavioral telemetry for system features that is invaluable for timelines.
- knowledgeC.db — app usage, focus, device lock/unlock, Siri events.
- interactionC.db — communication with contacts across apps.
- routined / cache_encryptedB.db — significant locations.
These exist only in FFS extractions (not standard backups) and can establish what the user was doing at a precise moment — but interpret carefully, as some events are system-generated, not user-driven.
Keychain Recovery
The keychain holds Wi-Fi passwords, tokens, app credentials, and certificates. It is encrypted with class keys derived from the passcode.
- Recoverable from an encrypted iTunes backup (with the backup password) or an FFS extraction.
- Items carry their own protection class; some are only available AFU.
Keychain contents can reveal account access and lateral context — handle them with the same legal care as any credential material.
Automated Parsing with iLEAPP
iLEAPP parses iOS backups and FFS extractions into structured reports, covering hundreds of artifact types.
- Decodes knowledgeC, sms, Safari history, app states, and more.
- Use it for triage; verify pivotal findings against the raw SQLite.
Run iLEAPP against a backup or extraction:
python3 ileapp.py -t fs -i ./ios_filesystem/ -o ./ileapp_report/
# Or -t itunes for a Finder/iTunes backup folderiCloud and Cross-Validation
Data deleted from the device may persist in iCloud (backups, Photos, Messages in iCloud, app data).
- iCloud access requires separate legal authority and proper credentials/tokens.
- Cross-validate on-device findings against cloud copies and against a second tool.
As always, confirm the extraction hash before and after analysis, and document tool versions and commands so another examiner can reproduce your results.
Quick Check
You decode an iMessage timestamp as a Unix epoch and the date comes out 31 years too early. What went wrong?
Recap: iOS Acquisition and Analysis
You can now navigate the iOS forensic stack.
- The Secure Enclave + Data Protection classes make AFU state pivotal.
- Encrypted backups include keychain/health; FFS extractions add behavioral DBs.
- Backups are indexed by Manifest.db with hashed filenames.
- Core evidence: sms.db, CallHistory, AddressBook, knowledgeC.db.
- Decode Apple/Cocoa timestamps (2001 epoch, +978307200).
- Triage with iLEAPP, validate manually, and consider iCloud with proper authority.
Next: parsing app artifacts and producing the report.
Frequently asked questions
Is the “iOS Acquisition and Analysis” lesson free?
Yes — the full text of “iOS Acquisition and Analysis” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “iOS Acquisition and Analysis”?
Extracting and analyzing iOS data. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cyber Security Academy?
No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “iOS Acquisition and Analysis” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cyber Security Academy lesson?
Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Mobile Forensics Fundamentals
- Android Acquisition and Analysis
- iOS Acquisition and Analysis
- Apps, Artifacts and Reporting