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?
gdb server
andlldb
part, when you've disassembled the app in IDA Pro. Your problem might come from the fact thatgdbserver
, 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 runninggdbserver
, and the IDA debugger will know all symbols that were defined during the disassembly phase.