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

IOS Frida - Observe Class Arguments #22

Open
rosman83 opened this issue Oct 31, 2021 · 1 comment
Open

IOS Frida - Observe Class Arguments #22

rosman83 opened this issue Oct 31, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@rosman83
Copy link

I am using the observe class method for Frida and am successfully able to hook into the function. However the logging is a bit cryptic.

For this example, assumine the class is MainClass and the method in it that I'm observing is ChildMethod

My end goal is to call ChildMethod manually but to do that I need to replicate and pass in the arguments through Frida, which I am trying to get by observing them in the following. I'm used to variables and passing them into functions - whereas this code is slightly cryptic. How do I achieve this end goal - and which of these is the actual args in the function?

0x105082d74 winnerscircle20!0x3ded74 (0x1003ded74)
0x105082ee8 winnerscircle20!0x3deee8 (0x1003deee8)
0x1051f5638 winnerscircle20!0x551638 (0x100551638)
0x1057c62a0 FBLPromises!0x62a0 (0x62a0)
0x183a0d298 libdispatch.dylib!_dispatch_call_block_and_release
0x183a0e280 libdispatch.dylib!_dispatch_client_callout
0x1839bd0ac libdispatch.dylib!_dispatch_main_queue_callback_4CF$VARIANT$mp
0x183d555e0 CoreFoundation!__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
0x183d4fa88 CoreFoundation!__CFRunLoopRun
0x183d4eba0 CoreFoundation!CFRunLoopRunSpecific
0x19aab7598 GraphicsServices!GSEventRunModal
0x1866402f4 UIKitCore!-[UIApplication _run]
0x186645874 UIKitCore!UIApplicationMain
0x104ca80ec winnerscircle20!0x40ec (0x1000040ec)
0x183a2d568 libdyld.dylib!start
@rosman83
Copy link
Author

rosman83 commented Oct 31, 2021

I found the method takes in two pointers - and those two pointers are "0x28155a230" , "0x102ae7012" if this helps. Did this through using .argumentTypes directly on frida terminal and the return type is also a pointer

Currently I want to call the class like so var instance = ObjC.classes.MainClass.alloc().init(); and then use its method using something like this and passing the pointers as args:
instance.ChildMethod(pointer1, pointer2);

@iddoeldor iddoeldor added the help wanted Extra attention is needed label Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants