The previous publication talks about the basics of using the bootloader-level exploit for extracting iOS devices. In this article, we are posting a comprehensive step-by-step guide of using the new checkm8 capability of iOS Forensic Toolkit for performing forensically sound extractions of a range of Apple devices.
Before you begin, make sure you have everything required to perform the extraction. Since checkm8 is a very specific exploit, you’ll need all of the following to do the job.
All models of iPhone 5s, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone SE (original model) are supported including the following devices:
Unofficial support for the following models:
We’ve been able to test the toolkit with all supported iPhone models running all major versions of iOS. The support for iPad and iPod Touch models is unofficial as we’ve been unable to source every iPad model running every version of iOS.
You may have noticed that the iPad Air 2 and iPad Pro (1st gen) are missing from the list. This is because these devices are built on the A8X/A9X platforms unlike the rest of the models that are using SoC that are similar to those used in the corresponding iPhone models. The list of similar devices is available in Apple Mobile Devices Cheat Sheet | ElcomSoft blog.
Our extraction solution does not use the operating system installed on the iPhone to boot the device. Instead, a separate, patched version of the original Apple firmware is booted in the device RAM. This process requires you to have a copy of the original Apple firmware image that matches the device’s iOS version and build number exactly.
In many cases, the iOS version will be detected automatically by EIFT during the first stage of the exploit. The detection is based on the detected iBoot version and device hardware. However, in some cases the iBoot version may correspond to several iOS builds.
If this is the case, you can attempt to use the first version of iOS suggested by EIFT. After you boot and unlock the iPhone using the downloaded image, EIFT will either be able to unlock the disk, or will display the correct iOS version.
Alternatively, you can check the iOS version in Settings – About on the iPhone itself.
Tap iOS version to see the build number:
Note that you can still boot the phone using a close enough iOS build suggested by EIFT. If the wrong build is used, EIFT will be able to detect and display the correct build number at a later stage of the exploit.
If you know the screen lock passcode (or if the passcode is empty), Elcomsoft iOS Forensic Toolkit 8.0 can extract the file system image and decrypt the keychain. Otherwise, limited BFU extraction is available.
Note that the location of the extracted information has changed in EIFT 8.0 compared to previous versions. EIFT will create a folder named “ElcomSoft” in your home folder on the Mac. The following subfolders will be created:
For checkm8 extraction, the “logs” folder will contain the debug logs, while “eift_checkm8” will receive the data extracted (the file system and keychain).
At this point, you have successfully exploited the device.
Once the exploit is installed, you will be able to list partitions, unlock and extract data.
[3] Diskinfo
This optional command displays the list of partitions available on the iPhone after you exploit the device. Newer versions of iOS use APFS as a file system, in which case the number of partitions can be up to 7. EIFT will only extract DATA partitions.
This command may be useful in a case the file system is marked as “dirty”. The “file system dirty” flag can be set by iOS if the device had not been shut down correctly, e.g. after a forced shutdown, interrupted boot, and similar cases. If this is the case, you will see the following information:
Note that, contrary to what you see on the screen shot, you won’t have to manually run any commands. Instead, EIFT will initiate a file system check in order to mount the system/data partitions read-only.
[4] Unlock
This option is mandatory for subsequent extraction. In all iPhones, the data is stored encrypted. In order to access the data, you need to unlock the device. Since the iPhone is in the “Before First Unlock” (BFU) state, you must provide a valid screen lock passcode in order to access the data.
EIFT will first prompt if the passcode is known. If you do know the passcode, or if the passcode is empty, type “Y” or “y”. If, however, the passcode is set but unknown, enter “N” or “n” for BFU extraction.
If the passcode is empty, EIFT will automatically unlock the disk.
For non-empty passcodes, you will have 7 attempts to enter the passcode. Once the correct passcode is entered, the toolkit will automatically mount the disk.
WARNING: After 10 incorrect passcode attempts the iPhone will be permanently locked, and only BFU extraction will be available. This is why EIFT stops after only 7 unsuccessful attempts.
On successful unlock, you will see the following screen on the iPhone:
There are several specific conditions that may prevent unlocking the disk and extracting the data.
Version mismatch
While EIFT attempts to detect (“guesstimate”) the correct version of iOS installed on the iPhone based on the device hardware ID and bootloader version, there may be no concrete match between versions of iBoot and iOS. If this is the case, EIFT will list several possible versions of iOS along with download links. If you don’t know the exact version of iOS installed on the iPhone (as could be seen in the Settings – About on the iPhone), you may try using one of the listed firmware images. In many cases, this is enough to unlock the disk and extract the data. In some cases, there could be a mismatch between SEP and iOS versions. If this is the case, you will see the following error message:
If this occurs, download the exact version of iOS that is listed in the error message as shown on the screen shot above, and try again. However, you may still try the current version of iOS; there will be no risk, and the extraction may still work.
Dirty file system
On very old versions of iOS using the HFS file system, iOS may raise the “file system dirty” flag if the device had not been shut down correctly, spontaneously rebooted of did not finish the boot sequence. This is not applicable to 64-bit devices running iOS 10.3 and up; there is no ‘dirty’ bit in APFS that replaced HFS since iOS 10.3.
If the file system is marked ‘dirty’, the device will refuse to boot the supplied disk image. For this reason, initiate a file system check to mount the system/data partitions read-only. This is performed automatically during the unlock.
Once you have unlocked the disk, you can extract the keychain and image the file system. Subsequent commands are very similar in form and function to agent-based extraction except you won’t need to perform any actions on the iPhone.
Locked and disabled devices
If the iPhone is disabled after multiple incorrect passcode entries, you will be unable to unlock the disk even after the device is exploited due to SEP protection.
There is no known workaround. The only option for locked and disabled devices is BFU extraction. To invoke BFU extraction, answer “N” or “n” to the prompt asking if you know the passcode.
Device is running a beta version of iOS
There is no official support for iOS betas. However, more likely than not, the closest official iOS release will allow to unlock the disk and extract the data. You can try one version down and one version up. For example, for devices running iOS 11.2 beta, try iOS 11.1 and 11.2.
[5] Decrypt keychain
Run this command to extract and decrypt the keychain.
[6] Tar user partition
Run this command to extract a file system image and save it into a .tar file.
[7] SSH
This is a highly optional command allowing to establish SSH connectivity between the computer and the iPhone. For advanced users and support inquiries only.
Extract critical evidence from Apple iOS devices in real time. Gain access to phone secrets including passwords and encryption keys, and decrypt the file system image with or without the original passcode. Physical and logical acquisition options for all 64-bit devices running all versions of iOS.
Elcomsoft iOS Forensic Toolkit official web page & downloads »