iOS Frida Configuration

Installing Frida

Steps to install Frida on a Jailbroken device:

  1. Open Cydia/Sileo app.

  2. Navigate to Manage -> Sources -> Edit -> Add.

  3. Enter "https://build.frida.re" as the URL.

  4. Go to the newly added Frida source.

  5. Install the Frida package.

If you are using Corellium you will need to download the Frida release from https://github.com/frida/frida/releases (frida-gadget-[yourversion]-ios-universal.dylib.gz) and unpack and copy to the dylib location Frida asks for, e.g.: /Users/[youruser]/.cache/frida/gadget-ios.dylib

After installed, you can use in your PC the command frida-ls-devices and check that the device appears (your PC needs to be able to access it). Execute also frida-ps -Uia to check the running processes of the phone.

Frida without Jailbroken device & without patching the app

Check this blog post about how to use Frida in non-jailbroken devices without patching the app: https://mrbypass.medium.com/unlocking-potential-exploring-frida-objection-on-non-jailbroken-devices-without-application-ed0367a84f07

Frida Client Installation

Install frida tools:

With the Frida server installed and the device running and connected, check if the client is working:

Frida Trace

Get all classes and methods

  • Auto complete: Just execute frida -U <program>

  • Get all available classes (filter by string)

  • Get all methods of a class (filter by string)

  • Call a function

Frida Fuzzing

Frida Stalker

From the docs: Stalker is Frida’s code tracing engine. It allows threads to be followed, capturing every function, every block, even every instruction which is executed.

You have an example implementing Frida Stalker in https://github.com/poxyran/misc/blob/master/frida-stalker-example.py

This is another example to attach Frida Stalker every time a function is called:

fpicker is a Frida-based fuzzing suite that offers a variety of fuzzing modes for in-process fuzzing, such as an AFL++ mode or a passive tracing mode. It should run on all platforms that are supported by Frida.

  • Prepare the FS:

  • Fuzzer script (examples/wg-log/myfuzzer.js):

  • Compile the fuzzer:

  • Call fuzzer fpicker using radamsa:

Logs & Crashes

You can check the macOS console or the log cli to check macOS logs. You can check also the logs from iOS using idevicesyslog. Some logs will omit information adding <private>. To show all the info you need to install some profile from https://developer.apple.com/bug-reporting/profiles-and-logs/ to enable that private info.

If you don't know what to do:

You can check the crashes in:

  • iOS

    • Settings → Privacy → Analytics & Improvements → Analytics Data

    • /private/var/mobile/Library/Logs/CrashReporter/

  • macOS:

    • /Library/Logs/DiagnosticReports/

    • ~/Library/Logs/DiagnosticReports

Frida Android Tutorials

Frida Tutorial

References

Last updated