iOS Hooking With Objection
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
For this section the tool Objection is going to be used. Start by getting an objection's session executing something like:
You can execute also frida-ps -Uia
to check the running processes of the phone.
env
: Find the paths where the application is stored inside the device
ios bundles list_bundles
: List bundles of the application
ios bundles list_frameworks
: List external frameworks used by the application
memory list modules
: List loaded modules in memory
memory list exports <module_name>
: Exports of a loaded module
ios hooking list classes
: List classes of the app
ios hooking search classes <search_term>
: Search a class that contains a string. You can search some uniq term that is related to the main app package name to find the main classes of the app like in the example:
ios hooking list class_methods
: List methods of a specific class
ios hooking search methods <search_term>
: Search a method that contains a string
Now that you have enumerated the classes and modules used by the application you may have found some interesting class and method names.
ios hooking watch class <class_name>
: Hook all the methods of a class, dump all the initial parameters and returns
ios hooking watch method "-[<class_name> <method_name>]" --dump-args --dump-return --dump-backtrace
: Hook an specific method of a class dumping the parameters, backtraces and returns of the method each time it's called
ios hooking set return_value "-[<class_name> <method_name>]" false
: This will make the selected method return the indicated boolean
ios hooking generate simple <class_name>
:
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)