iOS Frida Configuration
Learn & practice AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking:
HackTricks Training GCP Red Team Expert (GRTE)
Installing Frida
Steps to install Frida on a Jailbroken device:
Open Cydia/Sileo app.
Navigate to Manage -> Sources -> Edit -> Add.
Enter "https://build.frida.re" as the URL.
Go to the newly added Frida source.
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:
This is interesting from debugging purposes but for fuzzing, to be constantly .follow() and .unfollow() is very inefficient.
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.
Install fpicker & radamsa
Prepare the FS:
Fuzzer script (
examples/wg-log/myfuzzer.js):
Compile the fuzzer:
Call fuzzer
fpickerusingradamsa:
In this case we aren't restarting the app or restoring the state after each payload. So, if Frida finds a crash the next inputs after that payload might also crash the app (because the app is in a unstable state) even if the input shouldn't crash the app.
Moreover, Frida will hook into exception signals of iOS, so when Frida finds a crash, probably an iOS crash reports won't be generated.
To prevent this, for example, we could restart the app after each Frida crash.
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
iOS only stores 25 crashes of the same app, so you need to clean that or iOS will stop creating crashes.
Frida Android Tutorials
Frida TutorialReferences
Learn & practice AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking:
HackTricks Training GCP Red Team Expert (GRTE)
Last updated