Skip to content

Commit e4c9894

Browse files
committed
Updated for iOS 12.
1 parent d2ef5a2 commit e4c9894

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

Module-1/README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ _Note: If you need help jailbreaking your device, there are many resources onlin
77
#### On your computer
88

99
- Download the latest version of [iTunnel](https://code.google.com/archive/p/iphonetunnel-usbmuxconnectbyport/downloads): iTunnel will allow you to [SSH over USB](https://iphonedevwiki.net/index.php/SSH_Over_USB).
10-
- Download the latest version of [Clutch](https://github.com/KJCracks/Clutch/releases): Clutch will allow you to decrypt iOS applications on iOS < 10.0.
1110
- Download the latest version of [Cydia Impactor](http://www.cydiaimpactor.com/): Impactor will allow you install iOS applications on your device, signed with a developer account's certificate.
1211
- Download and install [Hopper](https://www.hopperapp.com/): Hopper is a reverse engineering tool that lets you disassemble, decompile and debug ARM applications, it supports other architectures but in this course I'll focus just on ARM-based binaries. The trial version is enough.
13-
- Download the latest version of [bfinject's](https://github.com/BishopFox/bfinject) `bfinject.tar`: bfinject will allow you to use `Cycript` and `Clutch` on iOS >= 11.0.
1412
- Download the latest version of [Cycript](http://www.cycript.org/): Cycript will allow you to modify the applications' behaviour at runtime via an interactive console.
1513
- Download the latest version of [Frida](https://www.frida.re/docs/ios/): Frida will allow you to write scripts to change the applications' behaviour at runtime.
1614
- To install `Frida`:
@@ -20,6 +18,15 @@ _Note: If you need help jailbreaking your device, there are many resources onlin
2018
- Download the latest version of [Bettercap](https://www.bettercap.org/installation/): Bettercap will allow you to perform MitM attacks remotely to a device.
2119
- Download the latest version of [class-dump-z](https://code.google.com/archive/p/networkpx/downloads): class-dump-z will allow you to dump Objc classes. There's a Swift version but you won't needed since my vulnerable app is written in Objc.
2220
- Download the latest version of [Ghidra](https://ghidra-sre.org/): Ghidra is another reverse engineering tool, which will let you do some of the same tasks as Hopper.
21+
##### If your device is on iOS 10.x
22+
- Download the latest version of [Clutch](https://github.com/KJCracks/Clutch/releases): Clutch will allow you to decrypt iOS applications.
23+
24+
##### If your device is on >= iOS 11
25+
- Download the latest version of [bfinject's](https://github.com/BishopFox/bfinject) `bfinject.tar`: bfinject will allow you to use `Cycript` and `Clutch` to decrypt iOS applications.
26+
27+
##### If your device is on iOS 12.x
28+
- Download the latest version of [frida-ios-dump](https://github.com/AloneMonkey/frida-ios-dump): `frida-ios-dump` will allow you to decrypt iOS applications and transfer them automatically to your computer.
29+
- Install its dependencies `sudo pip install -r requirements.txt --upgrade`.
2330
2431
#### On your device with iOS version < 11.0
2532
@@ -47,7 +54,7 @@ In some cases a jailbreak tool for iOS < 11.0 might not come with a SSH client,
4754

4855
If your device asks for a `root` password then it _already_ has SSH working, thus you can skip this step.
4956

50-
#### On your device with iOS version >= 11.0
57+
#### On your device with iOS > 11
5158

5259
- Connect your device to your computer.
5360
- On your computer, open a terminal window and run `iTunnel` with the following parameters:
@@ -82,6 +89,14 @@ If your device asks for a `root` password then it _already_ has SSH working, thu
8289
tar xvf bfinject.tar
8390
```
8491
92+
#### On your device with iOS 12.x
93+
- Open Cydia and search `frida` and install it:
94+
- Tap the `Sources` tab.
95+
- Add a source: `https://build.frida.re`
96+
- Now you can go to the `Search` tab and search for `frida`.
97+
98+
(*Note: Since I've only used the Unc0ver jailbreaks I don't know if you're jailbroken with [Chimera](https://chimera.sh/) and/or use `Sileo` as your package manager if you can install Frida.*)
99+
85100
### Conclusions
86101

87102
- Now you should have a device ready to start reversing. Gladly you'll need to perform all these steps only once per device, even when you lose your jailbreak state if your device runs out of batter or restarts for whatever reason[^1]. Don't worry if you don't know some of these tools, in the following modules I'll explain what's their purpose and how to use them.

Module-2/README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ _Note: In case you missed it, you'll only need a jailbroken device for this modu
3131
```
3232
- Now you have a decrypted version of the app.
3333
34-
#### If your device's iOS version >= 11.0
34+
#### If your device is on iOS 11.x
3535
- Download any application from the App Store.
3636
- Run `iTunnel` to forward your SSH traffic via USB:
3737
```bash
@@ -61,6 +61,29 @@ _Note: In case you missed it, you'll only need a jailbroken device for this modu
6161
```
6262
- Now you have a decrypted version of the app.
6363

64+
#### If your device is on iOS 12.x
65+
- Download any application from the App Store.
66+
- Run `iTunnel` to forward your SSH traffic via USB:
67+
```bash
68+
itnl --lport 2222 --iport 22
69+
```
70+
- On your computer, navigate to where you stored `frida-ios-dump`.
71+
```bash
72+
cd ~/Downloads/frida-ios-dump/
73+
```
74+
- Edit `dump.py` to match your device's settings like root password (default is `alpine`) and SSH forwarding port (in this case it'd be `2222`).
75+
- List the installed applications by running:
76+
```bash
77+
./dump.py -l
78+
```
79+
- Copy the application's `Identifier`.
80+
- Decrypt the application by running:
81+
```bash
82+
./dump.py <identifier>
83+
```
84+
- You'll see the application will be launched on your device and then, if all goes well, you should have a `.ipa` bundle on the same directory where you ran the script.
85+
- Now you have a decrypted version of the app.
86+
6487
#### Extra information
6588

6689
To keep the step-by-step instructions as clean and straightforward as possible, I omitted some details in some steps. Here's some information that hopefully will clarify any doubts you may have:

Module-4/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Since you need a jailbroken device for this exercise, I'm assuming you've been u
260260
```
261261
- You have now an interactive console that you can use to send commands to the `CoinZa` application.
262262

263-
**If your device's iOS version >= 11.0**
263+
**If your device is on iOS 11.x**
264264
- Run `iTunnel` to forward your SSH traffic via USB:
265265
```bash
266266
itnl --lport 2222 --iport 22
@@ -298,6 +298,8 @@ Abort trap: 6
298298
cp /usr/local/Cellar/ruby\@2.0/2.0.0-p648_7/lib/libruby.2.0.0.dylib /usr/local/bin/Cycript.lib/
299299
```
300300

301+
*Note: Haven't been able to get cycript/BFInject to work on iOS 12.x but runtime manipulation on Cycript can be done on Frida (see below).*
302+
301303
**Any version of iOS**
302304
- Now that you have an interactive console via `Cycript` we can start by removing that annoying popup. First we are going to use the `choose` function to get all the instances of the `UIAlertController` class. The `choose` function reads the provided class signature and searches the memory for objects that have a similar signature and returns an array of all the objects it can find:
303305
```bash

0 commit comments

Comments
 (0)