• Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool to decrypt 64 bits iOS firmware images (iBoot/LLB/iBSS/iBEC).

autodecrypt

PyPI version

Simple tool to decrypt iOS firmware images.

Going to the iPhone wiki and copying and pasting firmware keys to your terminal is boring.

autodecrypt will grab keys for you and decrypt the firmware image you want.

Usage

Usage: autodecrypt [OPTIONS]

Options:
  -f, --filename TEXT             File  [required]
  -d, --device TEXT               Device  [required]
  -i, --ios_version TEXT          iOS version
  -b, --build TEXT                Build ID of iOS version
  -k, --ivkey TEXT                IV and key to decrypt file
  -l, --local                     Use path to local file
  -D, --download                  Download file
  -B, --beta                      Specify that it is a beta firmware
  -P, --pongo                     Use PongoOS over USB for decryption
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.

Dependencies

To run autodecrypt, use poetry with a virtualenv:

  • virtualenv -p python3 env
  • pip3 install poetry
  • poetry install

Installation

pip3 install autodecrypt

Examples

Download and decrypt iBSS using keys from theiphonewiki

» autodecrypt -f iBSS.iphone6.RELEASE.im4p -i 10.3.3 -d iPhone6,2
[i] downloading iBSS.iphone6.RELEASE.im4p
[i] image : ibss
[i] grabbing keys for iPhone6,2/14G60
[x] iv  : f2aa35f6e27c409fd57e9b711f416cfe
[x] key : 599d9b18bc51d93f2385fa4e83539a2eec955fce5f4ae960b252583fcbebfe75
[i] decrypting iBSS.iphone6.RELEASE.im4p to iBSS.iphone6.RELEASE.bin...
[x] done

Download and decrypt SEP firmware by specifying keys

» autodecrypt -f sep-firmware.n841.RELEASE.im4p -b 17C5053a -d iPhone11,8 -k 9f974f1788e615700fec73006cc2e6b533b0c6c2b8cf653bdbd347bc1897bdd66b11815f036e94c951250c4dda916c00
[i] downloading sep-firmware.n841.RELEASE.im4p
[x] iv  : 9f974f1788e615700fec73006cc2e6b5
[x] key : 33b0c6c2b8cf653bdbd347bc1897bdd66b11815f036e94c951250c4dda916c00
[i] decrypting sep-firmware.n841.RELEASE.im4p to sep-firmware.n841.RELEASE.bin...
[x] done

Use foreman instance to grab firmware keys

» export FOREMAN_HOST="https://foreman-public.sudosecuritygroup.com"
» autodecrypt -f LLB.n112.RELEASE.im4p -i 13.2.3 -d iPod9,1
[i] downloading LLB.n112.RELEASE.im4p
[i] image : llb
[i] grabbing keys for iPod9,1/17B111
[i] grabbing keys from https://foreman-public.sudosecuritygroup.com
[x] iv  : 85784a219eb29bcb1cc862de00a590e7
[x] key : f539c51a7f3403d90c9bdc62490f6b5dab4318f4633269ce3fbbe855b33a4bc7
[i] decrypting LLB.n112.RELEASE.im4p to LLB.n112.RELEASE.bin...
[x] done

Decrypt keys with PongoOS

I you wanna use this on Linux, you may have some USB permissions. I recommend copying the file 66-pongos.rules available on this repository to /etc/udev/rules.d/.

» autodecrypt -f iBoot.n71.RELEASE.im4p -d iPhone8,1 -i 14.1 -p
[i] downloading iBoot.n71.RELEASE.im4p
[i] grabbing keys from PongoOS device
[i] kbag : 03C9E01CA99FE6475566C791777169C0625B04B7BD4E593DE0F61ABF4E8DB1A987D9D6155C5A1F41D9113694658AC61C
[x] iv  : 245a9b52e53a704fe73d7b58734b00ae
[x] key : d3aa3c8cc20fa9d61e466f46aee374a92a125abb5b3f57264025c8c72127e321
[i] decrypting iBoot.n71.RELEASE.im4p to iBoot.n71.RELEASE.bin...
[x] done

Log

For debugging purposes you can check autodecrypt.log :

11/02/2019 21:39:41 Launching "['autodecrypt/autodecrypt.py', '-d', 'iPhone9,3', '-f', 'iBoot.d10.RELEASE.im4p', '-i', '12.3.1']"
11/02/2019 21:39:41 requesting IPSW's API for iPhone9,3
11/02/2019 21:39:41 done, now looking for version or build
11/02/2019 21:39:41 grabbing firmware codename for 16F203
11/02/2019 21:39:42 codename : PeaceF
11/02/2019 21:39:42 grabbing IPSW file URL for iPhone9,3/12.3.1
11/02/2019 21:39:42 downloading iBoot...
11/02/2019 21:39:43 img4 -i iBoot.d10.RELEASE.im4p iBoot.d10.RELEASE.bin 978fd4680cd4b624b0dfea22a417f51f0ee2b871defed42277fe18885053b1eb5c7ffe82f38ab8cf7772c69a0db5d386

Credits

  • checkra1n team for AES patches, kbag.m and PongoOS
  • tihmstar for wiki parsing (my method was pretty bad)
  • m1stadev for PyIMG4

More Repositories

1

ida-iboot-loader

IDA loader for Apple's 64 bits iBoot, SecureROM and AVPBooter
Python
135
star
2

Decrypt0r

CLI tool to decrypt iOS firmware components
C
78
star
3

checkm8

Implementation of checkm8 BootROM exploit for iPhone 7 written in C
C
56
star
4

seprom-loader

Binary Ninja loader for 64 bits Apple SEPROMs
Python
48
star
5

taco

A tool to download and decrypt a 64 bits iOS firmware images written in Rust
Rust
40
star
6

srom64helper

use https://github.com/argp/iBoot64helper which is the orginal repo and far more advanced
Python
32
star
7

ios-tools

Python scripts for iOS stuff
Python
30
star
8

dcsd_status

Set DCSD LED according to device state (Normal/Recovery/DFU)
C
29
star
9

sepfw-loader

Binary Ninja loader for A12 SEP firmware
Python
26
star
10

iOS-Utilities

Some iOS tools
C
25
star
11

sysnet_c

A tool to grab system and network info
C
17
star
12

binja-import-header

Small binja plugin to import header file to types
Python
17
star
13

ios-scripts

Scripts I use to setup a new macOS or Linux machine for iOS research
Shell
16
star
14

ibooter

A small utility I use with binaries built from iBoot src
C
16
star
15

sepsplit

SEP firmware split tool
C
13
star
16

triple_fetch

C
10
star
17

kbag

qwertyoruiop's kbag + a TCP server for future use
C
9
star
18

binja-win-docs

Python
8
star
19

cydia

cydia repo where I host cool stuff
Shell
8
star
20

idis_rs

My very basic iBoot disassembler toy in Rust
Rust
8
star
21

oracle

FastAPI + anyactl for decrypting iBoot and SEP kbags
Python
8
star
22

dcsd_led

Playing with LEDs on DCSD cables
C
8
star
23

dotfiles

My dotfiles
Shell
7
star
24

remotepy

SSH utility
Python
7
star
25

aarch64

aarch64 practice
Assembly
7
star
26

tcprelay

tcprelay from Marcan's fork - python3 support
Python
7
star
27

enter_recovery

Switch Apple device to recovery mode without specifying UDID - based on ideviceenterrecovery
C
7
star
28

ftab-loader

Binary Ninja loader for Apple's ftab firmwares.
Python
7
star
29

pypack

A Python script I use to pack IPSW for idevicererestore
Python
6
star
30

twitter-deter

scripts pour le concours de rebeudeter sur Twitter
Python
6
star
31

pongoshell

Python
5
star
32

easymobiledevice

Utiliser libimobiledevice plus simplement
C
5
star
33

comments-viewer

Binary Ninja plugin to show all comments in a QT window
Python
5
star
34

binjahub

Binary Ninja plugin + HTTP api to store BNDBs on a remote server
Python
5
star
35

iBoot32Patcher-iOS

Fork of iH8sn0w's iBoot32Patcher for iOS
C
4
star
36

etna-cli

CLI tool to deal with my school's intranet
Python
4
star
37

autochecker

TSS check and save blobs automaticaly
Python
4
star
38

twitna

A script I use for a Twitter bot
Python
4
star
39

idis

iBoot disassembler toy
C
4
star
40

iBoot64Finder-importer

Binja plugin to import iBoot64Finder content
Python
4
star
41

sysnet

Random tool to get system and network info
Rust
3
star
42

mysql_backup

script I use for MySQL backups
Shell
3
star
43

vdm

School project
Python
3
star
44

linux-builder

Random script to build the Linux kernel, busybox and qemu for ARM64
Shell
3
star
45

Decrypt0r-for-Windows

Un outil tout simple pour décrypter les rootfs et le kernelcache des fichiers IPSW
C
3
star
46

darwin-xnu

C
3
star
47

term

A serial terminal
C
3
star
48

youtube

Carnage
Python
2
star
49

libpartialzip

Forked from Openjailbreak.org
C
2
star
50

Sokoban

C
1
star
51

win-client-srv

Tiny client and server app you can implement in your Windows projects
C
1
star
52

rtl8192EU

Wireless USB adapter I use and I don't want to go to tp-link.com to dl
C
1
star
53

MyBookingServices

TIC-CLO5
Python
1
star
54

libmy

My own C lib
C
1
star
55

deployer

random school project, lot of fun
Python
1
star
56

netutil

Simple network utility
C
1
star
57

bazaar

Python
1
star
58

client-srv

Sysnet client server app for future stuff
C
1
star