2

So, its been very interesting to reverse engineer an iOS application and I have made significant improvement into learning how to read disassembly and understand them. Now I was trying to debug the iOS app using lldb debugserver.

I was able to attach my system to my jailbroken ipad running the gdb server and hooked it to one of the running process. Now the problem is, that the executable has no symbols (or at least lldb is telling me that). But when I tried to disassemble it in IDA Pro and Hopper, I was able to get all the objective-c classes and functions names.

For example, one of the function that is being used is HMACWithSecret which has the signature -[NSString(HMAC) HMACWithSecret:]

If I try to set a break point from lldb using the command

b -[NSString(HMAC) HMACWithString:]

Or any other variant

b HMACWithSecret:
b HMACWithSecret

It fails to find a location for the same. I know that in objective-c every call is made via objc_msgSend with arguments about which function to call. But if i want to set a breakpoint in the above function (or any other I reveal via Hopper/IDA Pro) what should I do?

2
  • I'm not sure if i understand you correctly, especially the gdb server and lldb part, when you've disassembled the app in IDA Pro. Your problem might come from the fact that gdbserver, when it attaches to a running process, doesn't know about the executable file and can't load symbols from it. But if you have IDA anyway, you can just use it to attach to the running gdbserver, and the IDA debugger will know all symbols that were defined during the disassembly phase. Commented Jul 3, 2015 at 22:23
  • I have the same problem . I attached IDA to a jailbroke ios deviece. But if I set breakpoint at main , it works . Otherwise if I set breakpoint at a fuction from thirdparty lib (.a file) , it doesn't work . Can anyone have the same problem? If yes , please give some clue .
    – KHacker
    Commented May 20, 2021 at 9:12

1 Answer 1

2

I was able to achieve this by installing gdbserver on my ipad. Then i ssh into the ipad and attach a remote lldb debugger (xcode tools) to attack breakpoints. A long method but works. There are now tools to debug in same way on android and ios.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.