homepage
Open menu
Go one level top
  • Train and Certify
    Train and Certify

    Immediately apply the skills and techniques learned in SANS courses, ranges, and summits

    • Overview
    • Courses
      • Overview
      • Full Course List
      • By Focus Areas
        • Cloud Security
        • Cyber Defense
        • Cybersecurity and IT Essentials
        • DFIR
        • Industrial Control Systems
        • Offensive Operations
        • Management, Legal, and Audit
      • By Skill Levels
        • New to Cyber
        • Essentials
        • Advanced
        • Expert
      • Training Formats
        • OnDemand
        • In-Person
        • Live Online
      • Course Demos
    • Training Roadmaps
      • Skills Roadmap
      • Focus Area Job Roles
        • Cyber Defence Job Roles
        • Offensive Operations Job Roles
        • DFIR Job Roles
        • Cloud Job Roles
        • ICS Job Roles
        • Leadership Job Roles
      • NICE Framework
        • Security Provisionals
        • Operate and Maintain
        • Oversee and Govern
        • Protect and Defend
        • Analyze
        • Collect and Operate
        • Investigate
        • Industrial Control Systems
    • GIAC Certifications
    • Training Events & Summits
      • Events Overview
      • Event Locations
        • Asia
        • Australia & New Zealand
        • Latin America
        • Mainland Europe
        • Middle East & Africa
        • Scandinavia
        • United Kingdom & Ireland
        • United States & Canada
      • Summits
    • OnDemand
    • Get Started in Cyber
      • Overview
      • Degree and Certificate Programs
      • Scholarships
    • Cyber Ranges
  • Manage Your Team
    Manage Your Team

    Build a world-class cyber team with our workforce development programs

    • Overview
    • Why Work with SANS
    • Group Purchasing
    • Build Your Team
      • Team Development
      • Assessments
      • Private Training
      • Hire Cyber Professionals
      • By Industry
        • Health Care
        • Industrial Control Systems Security
        • Military
    • Leadership Training
  • Security Awareness
    Security Awareness

    Increase your staff’s cyber awareness, help them change their behaviors, and reduce your organizational risk

    • Overview
    • Products & Services
      • Security Awareness Training
        • EndUser Training
        • Phishing Platform
      • Specialized
        • Developer Training
        • ICS Engineer Training
        • NERC CIP Training
        • IT Administrator
      • Risk Assessments
        • Knowledge Assessment
        • Culture Assessment
        • Behavioral Risk Assessment
    • OUCH! Newsletter
    • Career Development
      • Overview
      • Training & Courses
      • Professional Credential
    • Blog
    • Partners
    • Reports & Case Studies
  • Resources
    Resources

    Enhance your skills with access to thousands of free resources, 150+ instructor-developed tools, and the latest cybersecurity news and analysis

    • Overview
    • Webcasts
    • Free Cybersecurity Events
      • Free Events Overview
      • Summits
      • Solutions Forums
      • Community Nights
    • Content
      • Newsletters
        • NewsBites
        • @RISK
        • OUCH! Newsletter
      • Blog
      • Podcasts
      • Summit Presentations
      • Posters & Cheat Sheets
    • Research
      • White Papers
      • Security Policies
    • Tools
    • Focus Areas
      • Cyber Defense
      • Cloud Security
      • Digital Forensics & Incident Response
      • Industrial Control Systems
      • Cyber Security Leadership
      • Offensive Operations
  • Get Involved
    Get Involved

    Help keep the cyber community one step ahead of threats. Join the SANS community or begin your journey of becoming a SANS Certified Instructor today.

    • Overview
    • Join the Community
    • Work Study
    • Teach for SANS
    • CISO Network
    • Partnerships
    • Sponsorship Opportunities
  • About
    About

    Learn more about how SANS empowers and educates current and future cybersecurity practitioners with knowledge and skills

    • SANS
      • Overview
      • Our Founder
      • Awards
    • Instructors
      • Our Instructors
      • Full Instructor List
    • Mission
      • Our Mission
      • Diversity
      • Scholarships
    • Contact
      • Contact Customer Service
      • Contact Sales
      • Press & Media Enquiries
    • Frequent Asked Questions
    • Customer Reviews
    • Press
    • Careers
  • Contact Sales
  • SANS Sites
    • GIAC Security Certifications
    • Internet Storm Center
    • SANS Technology Institute
    • Security Awareness Training
  • Search
  • Log In
  • Join
    • Account Dashboard
    • Log Out
  1. Home >
  2. Blog >
  3. iOS Full File System Extraction Using Checkra1n and iOS BFU Triage Script – Part 1
370x370_Kevin-Ripa.jpg
Kevin Ripa

iOS Full File System Extraction Using Checkra1n and iOS BFU Triage Script – Part 1

A single exploit that affects every iOS device made over an approximately 5-year period is massive.

July 13, 2020

Foreword

WARNING: To be clear, the instructions below could result in bricking your device. Jailbreaking always carries risks and it is up to you to weigh the risk vs reward. Be sure to test these instructions on an exemplar device prior to an exhibit but bear in mind that just because it works once does not guarantee success on another device. Proceed at your own risk!

You should read ALL instructions first BEFORE starting out. Missing or typing even one small instruction incorrectly will cause the task to fail.

By Ian Whiffin (iwhiffin@gmail.com @blakdouble) and Shafik G. Punja (shafghp@gmail.com @qubytelogic)

For full post visit here

There are already so many great articles on the web that detail this process that it feels unnecessary. What we will try to do differently from other articles is to bring as much information as possible into one place. It is not feasible to cover all eventualities, but this article will attempt to walk you through all the steps required to go from a fresh MacOS install and an uncompromised iOS Device, to having a Full File System (FFS) extraction from a freshly jailbroken device.

This is part 1 of a 4-part blog series that will cover the entire process from setup of the examiner machine, through to the analysis of the extraction.

Background

Since its release back in September 2019, the iOS Exploit Checkm8 has seemingly taken the world by storm, and it's easy to see why. A single exploit that affects every iOS device made over an approximately 5-year period is massive. So much so that it has the attention of some of the biggest name vendors in forensics who are taking advantage of the exploit in their tools to extract full filesystems; something that only agencies with deep pockets could previously do.

I should state pretty early on for anyone who isn't familiar:

  1. Checkm8 is the iOS BootROM vulnerability exploit which affects iPhone 4S through to iPhone X (A5 to A11 chipsets). https://pangu8.com/jailbreak/checkm8/
  2. CheckRa1n is the jailbreak based on the Checkm8 exploit and affects the iOS operating system for iOS 12.3 and up. https://pangu8.com/jailbreak/checkm8/
  3. Both use DFU (Device Firmware Update) mode, where the vulnerability exists within the BootROM, that makes it possible to take over the boot process and execute unsigned code on devices. https://checkm8.info/checkra1n-jailbreak-exploit/
  4. To obtain a Full File System (FFS) extraction, you must know the passcode. There is NO BRUTE FORCE SUPPORT. For the purposes of this article, we will not be discussing BFU (Before First Unlock) jailbreaking or BFU extractions.
  5. An iOS device identified in a BFU state means that the device passcode has not yet been entered by the device user.
  6. Without the passcode, you can still extract data, but the data you get will be not include any of the encrypted data (ie. user data) and will basically be limited to data that the device requires at all times, and therefore cannot encrypt.

Tools such as those by Elcomsoft iOS Forensic Toolkit (EIFT) and Oxygen Forensic Detective (OFD) both produce FFS extractions of devices that are vulnerable to the checkRa1n jailbreak. Our testing has shown that the resulting TAR file is usable by ArtEx in exactly the same way that GK Extractions are.

The method we are going to focus on however is the method by fellow forensicator Mattia Epifani available at: https://github.com/RealityNet/ios_bfu_triage

This is a free and awesome tool that is pretty straightforward to use to obtain an FFS of a checkra1ned iOS device.

Requirements

Apple computer (Some of these steps will also work on Linux but this is outside of the scope of this article). 

Target iOS device must be vulnerable to Checkm8 and CheckRa1n.

To add more clarity here, the exploit 'Checkm8' runs on any iOS device from an iPhone 4S up to and including an iPhone X. However, the jailbreak 'checkra1n' only works on devices running iOS 12.3 and above.

This means that there are some devices that are vulnerable to Checkm8 (such as the iPhone 4S and 5) but not checkra1n, because they cannot run iOS12 or above. There are also devices (such as the iPhone XR or XS) that will run iOS12 but are not vulnerable to Checkm8.

This leaves a sweet spot (in Purple in the table below) of around 7 generations of device that are vulnerable to the exploit (in Red in the table below) and are capable of running a supported version of iOS (in Blue in the table below).

1.png


Preparation

In preparation for extracting a phone, there are a few pieces of software you need to install on your computer. Do these in the order they appear, as some of the tools are dependent on others. The following information with screenshots was compiled using MacOS 10.15.4 Catalina.

Download and Install Checkra1n on Mac

Download checkra1n from this location: https://checkra.in/. It is currently only supported on Mac and Linux in both GUI (Graphical User Interface) and CLI (Command Line Interface). The CLI also denotes the Terminal application on the Mac. In this article only the GUI Mac version will be shown.

At the time of writing, the latest version was noted as 0.10.1 beta. The older releases of checkra1n based on a quick perusal, shows they are all beta previews. Review of the change log for the latest release 0.10.1 beta shows added support of iOS 13.4 and 13.4.1.

Once checkra1n is downloaded (on your Mac), in the location you selected, please install it.

This is done by double clicking the DMG file, which will mount and open the DMG (Mac disk image) on the desktop. This screenshot shows the checkra1n beta 0.10.1 DMG file mounted on the desktop.

2.png


Drag this file over top the shortcut icon of the Applications folder. This screenshot is showing the contents of the mounted checkra1n beta 0.10.1 DMG file on the desktop.

3.png


The Application folder now shows the checkra1n app installed. In this case it was renamed to checkra1n_0.10.1.app in order to distinguish it from other versions of checkra1n.

4.png


Xcode CLT, brew, SSHPASS, libimobiledevice, and dialog

Why are we going on these side quests and installing more software tools? Because they are required for properly running the iOS BFU triage script. The iOS BFU triage script is named by the author. After the device is checkra1ned, this script has the ability to perform either a BFU extraction, which obtains a limited amount of data if the device is locked, or a complete full file system (FFS) extraction if the device is unlocked. Hence the reason for installing these tools now, so that you are ready to perform the extraction after the device is jailbroken with checkra1n. If you skip this part and try to run the iOS BFU triage script, you will fail at your task of obtaining an FFS.

The iOS BFU triage script instructions will be discussed in Part 3 of this blog post.


Install Xcode Command Line tools (CLT)

Xcode is the Apple Integrated Design Environment (IDE) used to create Apple Mac OS and iOS Applications. Typically, the IDE is a graphical interface and is available from the Mac OS App Store. However, for this process, you will need the Command Line Tools which do not get installed with the App Store version of Xcode. I typically install both, but the Command Line Tools should install without the need for Xcode.

The Command Line Tools (CLT) includes a module called GNU Compiler Collection (GCC) which includes libraries for various languages and is necessary for this extraction process to work.

To Install Command Line Tools, start the MacOS Terminal and type:

image.png


Once installation has finished, you can type the following to ensure installation worked.

image.png

Which should return: /Applications/Xcode.app/Contents/Developer


You can also confirm that GCC is installed by typing:

image.png


Terminal Tips: *Sometimes, copying and pasting from website into terminal can include characters that cause issues. If any errors occur, try typing the command instead of copy/paste to see if the issue is resolved.

If this is the first time installing CLT for Xcode, and if you are on Mac OS Catalina, then the following reference is a good guide with screenshots:

https://medium.com/flawless-app-stories/install-command-line-tools-on-macos-catalina-anansewaa-com-6f8c63120fd8

If you have previously installed Xcode, then you will see a different response from the Terminal. For example, in the terminal window shown below, the copy/paste did not work correctly due to extra characters from the HTML coding. As a workaround, we typed the command: xcode-select --install. The reply shows that CLT for Xcode is already installed.

5.png

Install Homebrew (brew)

HomeBrew is a free package management tool for MacOS. It makes it easy to install software from outside of the Apple ecosystem.

More information about HomeBrew can be found at https://brew.sh/

6.png

To install, enter the MacOS Terminal and type (or copy and paste) the following command and then press ENTER:

image.png


The terminal should respond by identifying what will be installed, and where brew will be installed to.

7.png


Press RETURN to start the installation.

8.png


This process can take a good few minutes. Use that time to go make yourself a brew. :)


Install libimobiledevice

Information on libimobiledevice can be found at: https://www.libimobiledevice.org/

Basically, libimobiledevice is a cross platform protocol tool for speaking to iOS devices, and is installed via HomeBrew from the MacOS Terminal. To install libimobiledevice, type the command shown below in terminal and press ENTER.

image.png


The terminal should respond with messages stating it is installing dependencies.

9.png


Install SSHPASS

Information on SSHPASS can be found at https://gist.github.com/arunoda/7790979

According to that page, SSHPASS is "a tiny utility, which allows you to provide the ssh password without using the prompt. This is very helpful for scripting." Again, we will use HomeBrew to install from the MacOS Terminal using the following command:

image.png


Install dialog

Dialog is little tool to make MacOS show user friendly dialog boxes from shell scripts. It is available from http://macappstore.org/dialog/

Again we will use HomeBrew to install from the MacOS Terminal using the following command:

image.png


10.png

We have now installed all the necessary tools and dependencies. In part 2 of this 4-part blog series, we will perform the actual jailbreak on a device.


Sources/References
  1. Ian Whiffin: https://www.doubleblak.com/
  2. Blog Articles Worth Reading!!! https://www.doubleblak.com/blogs.php
  3. FREE Tools (requires registration at no cost to download) https://www.doubleblak.com/software.php

Acknowledgements

The authors sincerely thank Kevin J. Ripa (@kevinripa) for taking the time to peer review this article. Kevin is a 25-year digital forensics veteran and Certified SANS instructor. He is one of the co-authors and instructors for SANS498: Battlefield Forensics & Data Acquisition, and also teaches the SANS SEC301, SEC401 and FOR500 courses.

Share:
TwitterLinkedInFacebook
Copy url Url was copied to clipboard
Subscribe to SANS Newsletters
Receive curated news, vulnerabilities, & security awareness tips
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Swaziland
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Yugoslavia
Zambia
Zimbabwe

By providing this information, you agree to the processing of your personal data by SANS as described in our Privacy Policy.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Recommended Training

  • SEC497: Practical Open-Source Intelligence (OSINT)
  • SEC617: Wireless Penetration Testing and Ethical Hacking
  • MGT521: Leading Cybersecurity Change: Building a Security-Based Culture

Tags:
  • Digital Forensics and Incident Response

Related Content

Blog
Blog_teaser_images_(21).png
Digital Forensics and Incident Response
October 5, 2022
Cracked Brute Ratel C4 framework proliferates across the cybercriminal underground
English-speaking and Russian-speaking cybercriminal forums are buzzing with activity following the leaking and cracking of the Brute Ratel C4 (BRC4)
Will_Thomas_370x370.png
Will Thomas
read more
Blog
FOR548.png
Digital Forensics and Incident Response
September 26, 2022
NEW DFIR COURSE IN DEVELOPMENT | FOR548: eDiscovery: Tactics for Conquering the Data Minefield
FOR548 teaches how to govern the eDiscovery process, where and how the data is stored and how to satisfy data collection requirements.
Viv_Ross_370x370.png
Viviana Ross
read more
Blog
FOR577.png
Digital Forensics and Incident Response
September 22, 2022
NEW SANS DFIR COURSE IN DEVELOPMENT | FOR577: LINUX Incident Response & Analysis
FOR577: Linux Incident Response & Analysis course teaches how Linux systems work and how to respond and investigate attacks effectively.
Viv_Ross_370x370.png
Viviana Ross
read more
  • Register to Learn
  • Courses
  • Certifications
  • Degree Programs
  • Cyber Ranges
  • Job Tools
  • Security Policy Project
  • Posters & Cheat Sheets
  • White Papers
  • Focus Areas
  • Cyber Defense
  • Cloud Security
  • Cybersecurity Leadership
  • Digital Forensics
  • Industrial Control Systems
  • Offensive Operations
Subscribe to SANS Newsletters
Receive curated news, vulnerabilities, & security awareness tips
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Swaziland
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Yugoslavia
Zambia
Zimbabwe

By providing this information, you agree to the processing of your personal data by SANS as described in our Privacy Policy.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
  • © 2023 SANS™ Institute
  • Privacy Policy
  • Contact
  • Careers
  • Twitter
  • Facebook
  • Youtube
  • LinkedIn