Acquisition methods · Lesson 3 of 7
iOS logical acquisition: encrypted backups with libimobiledevice
11 min read
A computer backup is the most widely available way to acquire an iPhone. This course uses that term for a backup written to a computer by Finder, the Apple Devices app, iTunes or libimobiledevice (also called a local or iTunes backup), as distinct from an iCloud Backup (lesson 2.7). It uses a service built into every device, needs no exploit, rarely destabilizes the phone and, when encrypted, contains much of what an examiner needs. This lesson explains how pairing works, why examiners set a known backup password, how to run a backup with the open-source libimobiledevice tools and how the backup folder is structured. It also covers what a backup never contains, so that you know when a full file system extraction (lesson 2.4) is needed.
Pairing: the trust relationship
Before a computer can request a backup, the iPhone must trust it. The user unlocks the phone, taps Trust when the "Trust This Computer" alert appears, and enters the passcode. According to Apple Platform Security, the computer and the phone then exchange 2048-bit RSA public keys, and a new escrow keybag and the key protecting it are split between the phone and the computer. The computer saves its side as a pairing record, also called a lockdown record, named after the device's UDID:
- macOS: /var/db/lockdown/<UDID>.plist
- Windows: %ProgramData%\Apple\Lockdown\<UDID>.plist
- Linux with libimobiledevice: /var/lib/lockdown/<UDID>.plist
The record holds the device, host and root certificates, the host and root private keys, a host ID, the computer's identifier (SystemBUID) and an entry named EscrowBag; the device's private key never leaves the phone. On iOS 11 and later, a pairing record that has not been used for more than 30 days expires. The user can clear all trusted computers with Reset Location & Privacy.
Several current features affect pairing:
- Passcode for backups. Since iOS 16.1 (and 15.7.1), the phone asks for its passcode each time a computer backup starts, even on a computer it already trusts.
- Stolen Device Protection. Enabled by default for new setups, restores and updates since iOS 26.4, and on managed devices since iOS 26.4.1. When the phone is away from familiar locations, a forensic vendor's testing reports that the trust confirmation requires Face ID or Touch ID, with no passcode fallback. Apple does not list pairing among the protected actions, so treat this as a reported behavior, test it on your own devices and record what happened.
- Wired Accessories and Lockdown Mode. The iOS 26 accessory setting and Lockdown Mode can block wired connections while the phone is locked (lesson 1.2).
A pairing record found on a suspect's computer is evidence of a trust relationship, and its file timestamps can help date it. If your authority covers it, an unexpired record can also be used to connect to the phone without a new trust prompt, but the phone usually still needs to be unlocked because of the wired-connection controls (lesson 1.2).
Why encrypt the backup
A computer backup is unencrypted unless a backup password is set. Apple's documentation lists what only an encrypted backup includes: saved passwords and other keychain data, Wi-Fi settings, browsing history, Health and Activity data and call history. For an examiner, the keychain alone can justify encryption: it may hold account tokens and passwords that open other sources, within your authority.
The backup password is a setting stored on the phone, not on the computer. Once set, every computer backup made by any computer is encrypted with it, which has three consequences:
- If no password is set, the examiner sets one before backing up. Use a strong password generated for the case, and record it and the fact that you set it, because this is a change to the device.
- If the user set a password, ask for it where your authority allows. Without it the backup cannot be decrypted. Recovering it by guessing is slow by design: since iOS 10.2 the password passes through two rounds of PBKDF2, a standard function that deliberately slows down password guessing, with large iteration counts.
- Reset All Settings (Settings › General › Transfer or Reset iPhone › Reset) removes an unknown backup password on iOS 11 and later. It requires the device passcode and, according to Apple, removes saved Wi-Fi networks, Bluetooth and Apple Watch pairings, Apple Pay cards, the keyboard dictionary, Face ID or Touch ID setup, location and privacy settings and the list of trusted computers, all of which can be evidence. With Stolen Device Protection on, away from familiar locations, it is subject to a one-hour security delay. Use it only when justified, inside a shielded environment, and document it as a significant change: published testing reports that the reset also turns airplane mode off and can remove the screen lock passcode. Apple documents neither effect, so test the reset first on a reference device with the same iOS version.
Keychain items marked "this device only" are wrapped with the device's UID key even in an encrypted backup, so they cannot be decrypted off the device (lesson 1.2).
Running the backup with libimobiledevice
libimobiledevice is a free, cross-platform library that uses the same protocols as Finder and the Apple Devices app. A typical sequence, run in a shielded environment with the phone powered and a tool version validated on a test device with the same iOS version (lesson 7.1):
- Connect the phone with a known-good cable and list devices with idevice_id -l. Record the UDID.
- Unlock the phone and pair with idevicepair pair, then confirm with idevicepair validate. Approve the trust prompt and enter the passcode on the phone.
- Save device information with ideviceinfo, redirecting its output to a file. Record ProductType, ProductVersion, BuildVersion, SerialNumber and UniqueDeviceID.
- Set the backup password with idevicebackup2 -i encryption on. The -i option asks for the password interactively; avoid typing passwords on the command line, where they stay in the shell history. On iOS 13 and later, if a passcode is set, the phone asks for it to confirm any change to backup encryption.
- Run idevicebackup2 backup --full followed by an existing output directory, and enter the passcode on the phone when asked. The --full option forces a full rather than incremental backup.
- Check the result with idevicebackup2 info followed by the same output directory, and confirm that Status.plist reports a finished snapshot.
- Hash the backup folder and record the values (lesson 2.7).
- Decide what happens to the backup password. Either leave it set and record it in the case file and on the evidence label, or remove it with idevicebackup2 -i encryption off before the phone is returned and record that change. Never return a phone with a backup password that only you know.
Then add the logical sources the backup misses. Copy the media folder through AFC (afcclient or the ifuse file system). Collect crash and diagnostic logs with idevicecrashreport -k followed by an existing output folder; without -k the tool removes the reports from the phone after copying them.
Also consider a sysdiagnose, a diagnostic archive that iOS creates on request. Press and hold both volume buttons and the side button for 1 to 1.5 seconds, then release them; a short vibration confirms the start. After several minutes (allow ten) the archive appears in the crash-report area, and idevicecrashreport copies it with the other logs. It contains an archive of the unified logs, the PowerLog database and other system state (lesson 4.6), none of which should be expected in a computer backup. It writes a large file to the phone, so record it as a change, and take it early, because many log entries expire within days.
Inside the backup folder
The backup is written to a folder named after the UDID, which is also how Finder stores backups on a Mac in ~/Library/Application Support/MobileSync/Backup. On Windows the folder is %USERPROFILE%\Apple\MobileSync\Backup or, on some installations, %AppData%\Apple Computer\MobileSync\Backup.
Info.plist, Status.plist and Manifest.plist
- Info.plist describes the device: Device Name, Product Type, Product Version, Build Version, Serial Number, IMEI, ICCID, Phone Number, Unique Identifier (the UDID), Last Backup Date and the installed applications.
- Status.plist describes the backup run: IsFullBackup, SnapshotState (finished when complete), Date, UUID and Version. A backup whose snapshot is not finished is incomplete.
- Manifest.plist describes the backup's protection and contents: IsEncrypted, WasPasscodeSet, the Lockdown dictionary with device details, Applications, and, in encrypted backups, BackupKeyBag and ManifestKey.
Dates in binary plists are stored as Mac absolute time: seconds since 2001-01-01 00:00:00 UTC. The backup in the Corvane case has the Status.plist Date value 795522000 (illustrative); adding 978,307,200 seconds gives the Unix time 1773829200, which is 2026-03-18 10:20:00 UTC, or 11:20:00 in the case's time zone, UTC+01:00. Check one value by hand when you validate a tool.
Manifest.db
Manifest.db is a SQLite database. Its Files table has one row per backed-up item, with these columns:
| Column | Content |
|---|---|
| fileID | SHA-1 of the string "domain-relativePath", in hexadecimal |
| domain | Where the file came from, such as HomeDomain, CameraRollDomain, KeychainDomain, AppDomain-<bundle ID> or AppDomainGroup-<group ID> |
| relativePath | The path within that domain |
| flags | Whether the row is a file, a directory or a link |
| file | A binary property list (NSKeyedArchiver, lesson 4.2) with size, mode, protection class, the wrapped per-file key, and LastModified, LastStatusChange and Birth timestamps in Unix seconds |
Each file is stored at <first two characters of fileID>/<fileID>. For example, the SHA-1 of HomeDomain-Library/SMS/sms.db is 3d0d7e5fb2ce288813306e4d4636395e047a3d28, so the Messages database is in folder 3d. The Photos library database, CameraRollDomain-Media/PhotoData/Photos.sqlite, has fileID 12b144c0bd44f2b3dffd9186d3f9c05b917cee25. Computing a fileID yourself is a quick way to confirm that a tool mapped a file correctly.
How the encryption fits together
In an encrypted backup, BackupKeyBag contains the class keys, wrapped with a key derived from the backup password. ManifestKey starts with a 4-byte protection class followed by a wrapped key that decrypts Manifest.db. Each file's own key is inside its file blob, wrapped with the class key for its protection class. Open-source tools perform these steps when given the password: mvt, with its decrypt-backup command, and iLEAPP, a free parser of iOS extractions and backups that later lessons use and cite (lesson 4.7). Work on decrypted copies on an encrypted examination workstation, because the output includes keychain secrets.
What a backup does not contain
According to Apple, a computer backup does not include data already synced and stored in iCloud, such as iCloud Photos, iMessages and SMS/MMS messages, nor Apple Mail data, Face ID or Touch ID settings, or Apple Pay information. Independent testing has found camera roll items in computer backups even with iCloud Photos on, and testing on earlier iOS versions found the Messages database there even with Messages in iCloud on. Originals that Optimize iPhone Storage keeps only in iCloud are absent, so check what each backup actually contains. Apps can also mark files as excluded from backup, as some messaging apps do (lesson 5.1), and caches and temporary files are not backed up. Many system databases and logs that lessons 4.4 to 4.6 rely on should not be expected in a backup. When those matter, collect a sysdiagnose, plan a full file system extraction (lesson 2.4) or look to cloud sources (lesson 2.7).
Applying this to the Corvane case
On Day 9, the day of collection, Lena provides her passcode, and the phone is still AFU. The laboratory is not a familiar location for her phone and Stolen Device Protection is on, and on this build the trust prompt asks for Face ID, as the laboratory's own testing had shown; with Lena present and the policy covering it, she authenticates and the examiner records the step. The examiner sets a case-specific backup password, records it, runs a full encrypted backup and confirms that Status.plist reports a finished snapshot with the Date converted above and that Info.plist shows the UDID 00008110-000A1C2E3B4D5F60 and the model identifier iPhone14,7. In Manifest.db, the WhatsApp database appears under domain AppDomainGroup-group.net.whatsapp.WhatsApp.shared with relative path ChatStorage.sqlite, fileID 7c7fba66680ef796b916b067077cc246adacf01d. iCloud Photos is on, so the examiner notes that the photo library may be incomplete in the backup and checks it against the media folder and an FFS.
Exam focus: Know how pairing works, where pairing records are stored and when they expire, and why examiners set a known backup password. Be able to describe the backup folder files, the Manifest.db Files table and how a fileID is computed, and list what an encrypted backup adds, what no computer backup contains and which logical sources, such as a sysdiagnose, fill part of the gap.
Practice questions
Check your understanding. These questions do not count towards the exam.
Sign in to save your progress and continue where you left off. It is free. Sign in