(lldb) thread step-out

Decrypt iOS app (from jailbroken device memory)

Manually

In this part we'll be moving straightforward: when app is launched, binary is decrypted and loaded memory. We will read the according blob from memory, write to a file, transfer that file to mac, replace encrypted section of Mach-O file with this blob and edit load commands so launchd will not consider this binary encrypted. That will not allow running the binary from sandboxed directories, you will need to re-sign the binary with your own sign identity or sideload the app to the device in some other way. Decrypted binary may be inspected in disassembler or other tools.

Prepare encrypted binary

You will need otool and scp utilities on macOS side

Attach debugger to iOS app

You will need debugserver on iOS side, lldb and MachOView on macOS side

Frida

There were many automated alternatives for this task: Clutch, bfinject, etc. As of iOS 12 this task can be most comfortably automated using Frida (once you'll figure out how to properly configure it). You will need iTunnel and Frida and Frida plugin called frida-ios-dump.


Sources

[1] Reverse Engineering iOS Applications by Ivan Rodriguez


Jan 2020, iOS 12.4