Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Passionfruit with Grapefruit #2451

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Document/Images/Chapters/0x06b/Passionfruit.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 5 additions & 7 deletions techniques/ios/MASTG-TECH-0053.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,19 @@ iPhone:~ root# exit
$ scp -P 2222 root@localhost:/tmp/data.tgz .
```

## Passionfruit
## Grapefruit

After starting [Passionfruit](0x08a-Testing-Tools.md#passionfruit) you can select the app that is in scope for testing. There are various functions available, of which one is called "Files". When selecting it, you will get a listing of the directories of the app sandbox.
After starting [Grapefruit](../../tools/ios/MASTG-TOOL-0061.md "Grapefruit") you can select the app that is in scope for testing. There are various functions available, of which one is called "Finder". When selecting it, you will get a listing of the directories of the app sandbox.

<img src="Images/Chapters/0x06b/passionfruit_data_dir.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_data_dir.png" width="100%" />

When navigating through the directories and selecting a file, a pop-up will show up and display the data either as hexadecimal or text. When closing this pop-up you have various options available for the file, including:

- Text viewer
- SQLite viewer
- Image viewer
- Database viewer
- Plist viewer
- Download

<img src="Images/Chapters/0x06b/passionfruit_file_download.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_file_download.png" width="100%" />

## Objection

Expand Down
4 changes: 2 additions & 2 deletions techniques/ios/MASTG-TECH-0057.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ $ frida-ps -Uai

It also shows which of them are currently running. Take a note of the "Identifier" (bundle identifier) and the PID if any as you'll need them afterwards.

You can also directly open passionfruit and after selecting your iOS device you'll get the list of installed apps.
You can also directly open [Grapefruit](../../tools/ios/MASTG-TOOL-0061.md "Grapefruit") and after selecting your iOS device you'll get the list of installed apps.

<img src="Images/Chapters/0x06b/passionfruit_installed_apps.png" width="400px" />
<img src="Images/Chapters/0x06b/grapefruit_installed_apps.png" width="400px" />
8 changes: 4 additions & 4 deletions techniques/ios/MASTG-TECH-0058.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ iOS apps can make their codebase modular by using different elements. In the MAS
- [Binary Frameworks (`XCFrameworks`)](https://developer.apple.com/videos/play/wwdc2019/416/): Xcode 11 supports distributing binary libraries using the `XCFrameworks` format which is a new way to bundle up multiple variants of a Framework, e.g. for any of the platforms that Xcode supports (including simulator and devices). They can also bundle up static libraries (and their corresponding headers) and support binary distribution of Swift and C-based code. `XCFrameworks` can be [distributed as Swift Packages](https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages).
- [Swift Packages](https://developer.apple.com/documentation/swift_packages): Xcode 11 add supports for Swift packages, which are reusable components of Swift, Objective-C, Objective-C++, C, or C++ code that developers can use in their projects and are distributed as source code. Since Xcode 12 they can also [bundle resources](https://developer.apple.com/videos/play/wwdc2020/10169/), such as images, storyboards, and other files. Since Package libraries are [static by default](https://developer.apple.com/videos/play/wwdc2019/408/?time=739). Xcode compiles them, and the packages they depend on, and then links and combines everything into the application.

You can visualize native libraries in Passionfruit by clicking on "Modules":
You can view native libraries in [Grapefruit](../../tools/ios/MASTG-TOOL-0061.md "Grapefruit") by clicking on the Modules icon in the left menu bar:

<img src="Images/Chapters/0x06b/passionfruit_modules.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_modules.png" width="100%" />

And get a more detailed view including their imports/exports:

<img src="Images/Chapters/0x06b/passionfruit_modules_detail.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_modules_detail.png" width="100%" />

They are available in the `Frameworks` folder in the IPA, you can also inspect them from the terminal:

Expand Down Expand Up @@ -136,4 +136,4 @@ For now this is all information you can get about the Frameworks unless you star

It is normally worth taking a look at the rest of the resources and files that you may find in the Application Bundle (.app) inside the IPA as some times they contain additional goodies like encrypted databases, certificates, etc.

<img src="Images/Chapters/0x06b/passionfruit_db_view.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_db_view.png" width="100%" />
10 changes: 5 additions & 5 deletions techniques/ios/MASTG-TECH-0059.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@ Regular 420 None ... Info.plist
Regular 493 None ... iGoat-Swift
```

You can also visualize the Bundle directory from Passionfruit by clicking on **Files** -> **App Bundle**:
You can also visualize the Bundle directory from [Grapefruit](../../tools/ios/MASTG-TOOL-0061.md "Grapefruit") by clicking on **Finder** -> **Bundle**:

<img src="Images/Chapters/0x06b/passionfruit_bundle_dir.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_bundle_dir.png" width="100%" />

Including the `Info.plist` file:

<img src="Images/Chapters/0x06b/passionfruit_plist_view.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_plist_view.png" width="100%" />

As well as the Data directory in **Files** -> **Data**:
As well as the Data directory in **Finder** -> **Home**:

<img src="Images/Chapters/0x06b/passionfruit_data_dir.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_data_dir.png" width="100%" />

Refer to the [Testing Data Storage](0x06d-Testing-Data-Storage.md "Data Storage on iOS") chapter for more information and best practices on securely storing sensitive data.
4 changes: 0 additions & 4 deletions techniques/ios/MASTG-TECH-0060.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ Jun 7 13:42:14 iPhone rm[9707] <Notice>: MS:Notice: Injecting: (null) [rm] (155
Jun 7 13:42:14 iPhone touch[9708] <Notice>: MS:Notice: Injecting: (null) [touch] (1556.00)
...
```

Additionally, Passionfruit offers a view of all the NSLog-based application logs. Simply click on the **Console** -> **Output** tab:

<img src="Images/Chapters/0x06b/passionfruit_console_logs.png" width="100%" />
6 changes: 3 additions & 3 deletions techniques/ios/MASTG-TECH-0061.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Note that currently, the latest versions of frida-server and objection do not co

Finally, since the keychain dumper is executed from within the application context, it will only print out keychain items that can be accessed by the application and **not** the entire keychain of the iOS device.

## Passionfruit (Jailbroken / non-Jailbroken)
## Grapefruit (Jailbroken / non-Jailbroken)

With [Passionfruit](0x08a-Testing-Tools.md#passionfruit) it's possible to access the keychain data of the app you have selected. Click on **Storage** -> **Keychain** and you can see a listing of the stored Keychain information.
With [Grapefruit](../../tools/ios/MASTG-TOOL-0061.md "Grapefruit") it's possible to access the keychain data of the app you have selected. Inside the **Storage** section, click on **Keychain** and you can see a listing of the stored Keychain information.

<img src="Images/Chapters/0x06b/Passionfruit_Keychain.png" width="100%" />
<img src="Images/Chapters/0x06b/grapefruit_keychain.png" width="100%" />

## Keychain-dumper (Jailbroken)

Expand Down
1 change: 0 additions & 1 deletion tools/ios/MASTG-TOOL-0061.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ With Grapfruit it's possible to explore different kinds of information concernin
- List the modules that are loaded by the app
- Dump class names
- Dump keychain items
- Access to NSLog traces