SHSH blob explained

In computing, a SHSH blob is a digital signature that Apple generates and uses to control the iOS versions that users can install on their iOS devices generally only allowing the newest iOS version to be installable. Apple's public name for this process is System Software Authorization (before iOS 7, System Software Personalization).[1] The term “SHSH blob” is unofficial and based on abbreviations for signed hash and binary large object. An alternative term, ECID SHSH, refers to the device's ECID, a unique identification number embedded in its hardware[2])

This process is controlled by the TATSU ("TSS") Signing Server (gs.apple.com) 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.[3] [4]

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.[5] 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 (or at least will require bypassing the intended function of the system).[6] [7]

This protocol is part of iPhone 3GS and later devices.[8]

TATSU Signing Server

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 ("CFW"). iTunes will not update or restore a device when it suspects the file has been modified.

This is a chain process, before installing the firmware, the installed iBoot has to verify the to-be-installed iBoot, and so on. You cannot install unsigned iOS versions, unless 1) you possess SHSH2 blobs and have set nonces (requiring exploits) or 2) you exploit the chain process.

Exploits and countermeasures

The requirement of SHSH Blobs in order to install to unsigned iOS versions can be bypassed using a replay attack, by saving blobs while an iOS firmware is still signed and later using them when installing the firmware. Newer iOS versions require more elements, such as a valid nonce, when saving SHSH blobs. Saving blobs for devices using the A12 SoC or newer also requires getting a matching nonce for a generator from a device to save valid blobs that can be used later in a restore. Even with SHSH blobs saved correctly, it is still sometimes not possible to jump to certain iOS versions due to incompatibility of the SEP (Secure Enclave) between versions.

Tools to save SHSH blobs for newer iOS versions include the application blobsaver and the command line tool tsschecker.

To use SHSH blobs to install an unsigned iOS version on a device, tools like futurerestore (based on idevicerestore) or its GUIs can be used, which allows specification of iOS firmware files and SHSH blobs to be used in the restore.

Previous bypass methods

For iOS 3 and 4, SHSH blobs were made of static keys (such as the device type, iOS version, and ECID), 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.[9]

iOS 5 and later versions of iOS implement an addition to this system, a random number (a cryptographic nonce) in the "APTicket",[10] making that simple replay attack no longer effective.[11] [12]

First released in 2009,[13] [14] TinyUmbrella is a tool for finding information about SHSH blobs saved on third party servers, saving SHSH blobs locally,[15] and running a local server to replay SHSH blobs to trick iTunes into restoring older devices to iOS 3 and 4.[16] [17] In June 2011, iH8sn0w released iFaith, a tool that can grab partial SHSH blobs from a device for its currently-installed iOS version (limited to iPhone 4 and older devices).[18] [19] In late 2011, the iPhone Dev Team added features to redsn0w that include 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.[20]

Replaying SHSH blobs for newer devices (Apple A12 and later) is not always possible, because there are no boot ROM (hardware level) exploits available for these devices. As of October 2012, redsn0w includes features for restoring newer devices between different versions of iOS 5,[21] but it cannot downgrade newer devices from iOS 6 to iOS 5.[22] [23]

See also

Notes and References

  1. Web site: iOS Security . Apple Inc. . May 2012 . Apple Inc. . 3 December 2012 . dead . https://web.archive.org/web/20121021133728/http://images.apple.com/ipad/business/docs/iOS_Security_May12.pdf . 21 October 2012 .
  2. Web site: How to jailbreak your iPad and start multitasking immediately . Stern . Zack . July 5, 2010 . ITBusiness.ca . December 30, 2012.
  3. Web site: Jailbreaking the iPad: What You Need to Know . Nat Futterman . May 25, 2010 . Geek Tech . PCWorld . August 2, 2011 . September 5, 2012 . https://web.archive.org/web/20120905045414/http://www.pcworld.com/article/196492/jailbreaking_the_ipad_what_you_need_to_know.html . dead .
  4. Web site: Apple Steps Up Their Game with iOS 5, Makes Jailbreaking More Difficult . Kumparak . Greg . June 27, 2011 . TechCrunch . December 30, 2012.
  5. Web site: iOS 5: An Exploitation Nightmare? . Stefan Esser . March 2012 . CanSecWest Vancouver . 3 December 2012.
  6. Web site: Save Your iDevice's SHSH to Avoid Losing the Ability to Jailbreak . Adam Dachis . April 25, 2011 . Lifehacker . August 2, 2011.
  7. Web site: Apple iOS 6 woes: Save the blobs if you need to downgrade . Smith . Gina . September 27, 2012 . Apple in the Enterprise . . December 30, 2012.
  8. Web site: Caching Apple's Signature Server . September 2009 . Jay Freeman (saurik) . December 3, 2012 . Saurik.com.
  9. Book: Hoog . Andrew . Strzempka . Katie . iPhone and iOS Forensics: Investigation, Analysis and Mobile Security for Apple iPhone, iPad and iOS Devices . December 3, 2012 . 2011 . Elsevier . 9781597496599 . 47–50.
  10. Web site: iOS 5 beta hobbles OS downgrades, untethered jailbreaks . Cheng . Jacqui . June 27, 2011 . Infinite Loop . Ars Technica . December 30, 2012.
  11. Web site: iOS 5 Will Halt SHSH Firmware Downgrades On iPhone, iPad, iPod touch . Redmond Pie . June 27, 2011 . November 12, 2011 . Oliver Haslam.
  12. Book: Levin . Jonathan . Mac OS X and iOS Internals: To the Apple's Core . December 29, 2012 . 2012 . John Wiley & Sons . 9781118222256 . 214.
  13. Web site: TinyTSS -- All your iphone restores are belong to you . notcom . September 19, 2009 . The Firmware Umbrella . 3 December 2012.
  14. Web site: TinyUmbrella - Unified TinyTSS and The Firmware Umbrella in ONE! . notcom . May 20, 2010 . The Firmware Umbrella . 1 January 2013.
  15. Web site: TinyUmbrella Updated To Support Backing Up iPhone 4S And iOS 5.0.1 SHSH Blobs . Brownlee . John . November 15, 2011 . Cult of Mac . December 30, 2012.
  16. Web site: Before Jailbreaking, Extract Your iPhone's SHSH Blobs with Umbrella . Sayam Aggarwal . July 26, 2010 . Cult of Mac . 3 December 2012.
  17. Web site: TinyUmbrella and ITunes 1013 Error Strike Again . Landau . Ted . April 22, 2011 . MacWorld . PCWorld . December 30, 2012.
  18. Web site: How To Save SHSH Blobs Of Any Old Firmware Running On Your iPhone, iPad, iPod touch Using iFaith . Goncalo Ribeiro . June 3, 2011 . Redmond Pie . 3 December 2012.
  19. Web site: Cydia Is Now Saving SHSH Blobs For iOS 5.0.1 Firmware . Morris . Paul . December 24, 2011 . Redmond Pie . December 30, 2012.
  20. Web site: How to Stitch Your SHSH Blobs Using RedSn0w to Create Firmware That Can Always Be Downgraded . Jeff Benjamin . September 27, 2011 . iDownloadBlog . 3 December 2012.
  21. Web site: Restoration reinvigoration . iPhone Dev Team . October 2012 . Dev Team Blog . 3 December 2012.
  22. Web site: Blob-o-riffic . iPhone Dev Team . September 2012 . Dev Team Blog . 3 December 2012.
  23. Web site: How To Re-Restore iPhone 4S, iPad 3, iPad 2, iPod touch From iOS 5.x To iOS 5.x Using Redsn0w . Morris . Paul . October 14, 2012 . Redmond Pie . December 30, 2012.