Obtaining iOS Software
There are several ways to download the iOS software outside of the installing it directly on to a device. Apple releases iOS as IPSW (.ipsw) files, which originally stood for iPhone Software. These IPSW files can be used to install on an appropriate device or can be used for security research. To obtain IPSW from Apple:
-
Apple Developer Program: If you join the [Apple developer] program, you can download all software from Apple including Beta releases. However, there is a cost of $99/year for this access.
-
Websites such as https://ipsw.me offer links directly to Apple's servers to download IPSW files which are currently signed as well as older releases that are no longer signed for installation. Keep in mind that each device has its own downloadable file.
-
While iOS is not open-source software, many of the components it uses are open-source and Apple releases those through their Open-Source page. For instance, iOS uses the XNU kernel which is released as part of their open-source initiative.
-
Lastly, you can use the ipsw tool to download the .ipsw files. This is also the same tool that we will use to parse and analyze the IPSW.
Description | Link |
---|---|
(1) Apple Developer | https://developer.apple.com/ |
(2)IPSW Download | https://ipsw.me |
(3)Apple Open Source | https://opensource.apple.com/ |
(4)XNU Kernel | https://github.com/apple-oss-distributions/xnu |
IPSW File Format | https://www.theiphonewiki.com/wiki/IPSW_File_Format |
The ipsw
utility is a Go-based program that is used to download and
parse IPSWs.
Downloads
There are a couple of ways to download IPSW files using this tool. The first one has been the fastest for me, but try them out to see what works best for you.
ipsw download appledb --os iOS -v 17.4.1 -d iPhone11,8
ipsw download i -d iPhone11,8 -b 21E237
ipsw download i -d iPhone11,8 -v 17.4.1
The -b
flag is for the build number. The -v
flag is for the version
number. Only one can be used in the command!
You could also use the -u
flag to show the URL of the file, and then use
wget or cURL to download the file:
ipsw download i -u -d iPhone11,8 -v 17.4.1
IPSW Filename Breakdown:
When viewing the filename: iPhone11,8_17.4.1_21E237_Restore.ipsw
Nomenclature | Description |
---|---|
iPhone | Device Family |
11,8 | Device Identifier (11,8 is an iPhone XR) |
17.4.1 | iOS Version |
21E237 | Build Number |
If you do not know the Device Identifier for your device, the ipsw tool can help you locate it from its internal database:
% ipsw device-list | grep -i 'iPhone XR'
| iPhone11,8 | n841ap | iPhone XR | t8020 | arm64 | 4 |
Column 1: Device Identifier
Column 2: Model Number of Device
Column 3: Description of the Device
Column 4: CPU Nomenclature
Column 5: Architecture
Column 6: Memory Class