Search code examples
cassemblyreverse-engineeringlldbcracking

Debug a release version of an OSX App via LLDB


I am trying to debug of an OSX desktop application (Mac os catalina 10.15.3) via LLDB.

lldb path/to/Electron.app
>>> Current executable set to 'path/to/Electron.app' (x86_64).

After that I can successfully add breakpoints to the debugger, but when I try to run application with run or process launch it always gives me:

error: process exited with status -1 (Error 1)

Also another issue with attaching to the pid. It gives me an error and can not attach to the process.

lldb -p 41324
>>> error: attach failed: Error 1

Why I can't disassemble the program inside debugger ?


Solution

  • I just find the way to debug and do not restrict any root accessibility... It is about the Apple's system integrity protection https://support.apple.com/en-us/HT204899

    and if you are willing to disable system integrity protection, just be careful and know what you are doing.

    Here is the article that how you can disable system integrity protection https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d