SHSH blob


A SHSH blob is an unofficial term referring to the digital signatures that Apple generates and uses to personalize IPSW files for each iOS device ; they are part of Apple's protocol designed to ensure that trusted software is installed on the device, generally only allowing the newest iOS version to be installable. Apple's public name for this process is System Software Personalization or, as of iOS 7+, System Software Authorization.
This process is controlled by the TATSU Signing Server where updates and restores can only be completed by iTunes if the version of iOS is being signed. Developers interested in iOS jailbreaking have made tools for working around this signature system in order to install jailbreakable older iOS versions that are no longer being signed by Apple.

Technical details

SHSH blobs are created by a hashing formula that has multiple keys, including the device type, the iOS version being signed, and the device's ECID. When Apple wishes to restrict users' ability to restore their devices to a particular iOS version, Apple can refuse to generate this hash during the restore attempt, and the restore will not be successful.
This protocol is part of iPhone 3GS and later devices.

TATSU Code Signing for iOS Deployment & iTunes verification

When iTunes restores or updates an iOS firmware, Apple has added many checkpoints before the iOS version is installed and on-device consolidation begins. At the first "Verifying iPhone software" iTunes communicates with "gs.apple.com" to verify that the IPSW file provided is still being signed. The TATSU server will give back a list of versions being signed. If the version is not being signed, then iBEC and iBoot will decline the image, giving an error of "error 3194" or "declined to authorize the image"
iTunes will communicate with iBoot throughout the process of an update or restore ensuring the firmware has not been modified to a Custom Firmware. iTunes will not update or restore a device when it suspects the file has been modified.
This is a chain process, before the firmware has been installed iBoot has to verify iBoot, iBoot has to verify the bootloader, and so on. You cannot install unsigned
iOS versions, unless 1) you have SHSH2 blobs and exploits have been released or 2) you exploit the chain process.

Exploits and countermeasures

For iOS 3 and 4, SHSH blobs were made of static keys, which meant that the SHSH blobs for a specific iOS version and device would be the same upon every restore. To subvert that system using a man-in-the-middle attack, server requests the unique SHSH blobs from Apple for the jailbroken device and caches those SHSH blobs on servers, so that if a user changes the hosts file on a computer to redirect the SHSH blobs check to cache instead of Apple's servers, iTunes would be tricked into checking those cached SHSH blobs and allowing the device to be restored to that version.
iOS 5 and later versions of iOS implement an addition to this system, a random number in the "APTicket", making that simple replay attack no longer effective. Versions of redsn0w after 0.9.9b9 include a way to bypass the nonce requirement for iOS 5, allowing the SHSH blobs and APTicket to both be replayed by "stitching" them into custom firmware.
First released in 2009, TinyUmbrella is a tool for finding out information about SHSH blobs saved on third party servers, saving SHSH blobs locally, and running a local server to replay SHSH blobs to trick iTunes into restoring older devices to iOS 3 and 4. In June 2011, iH8sn0w released iFaith, a tool that can grab partial SHSH blobs from a device for its currently-installed iOS version. In late 2011, the iPhone Dev Team added comprehensive SHSH blob management features to redsn0w, including the ability to save SHSH blobs with APTickets and stitch them into custom firmware in order to restore a device to iOS 5 or later.
Replaying SHSH blobs for newer devices is not always possible, because there are no boot ROM exploits available for these devices. As of October 2012, redsn0w includes features for restoring newer devices between different versions of iOS 5, but it cannot downgrade newer devices from iOS 6 to iOS 5.