I trying solve some https://crackmes.one/ simple quests. I newbie on it. But after export binary file (even without any changes), when I run the program in the terminal, I get the message "segmentation fault".

I use ghidra 9.1.2 in Kali Linux in VBox with 5 CPUs and 8 Gb RAM. Host: Ryzen 5 3600, 16 Gb DDR4.

I have record a video with demo of reproducing this issue: https://www.youtube.com/watch?v=M4RKXHRBNM8\

But I don't have such problems when I try solve windows exe crackmes on my host Windows 10 machine.

Also I note that after analysis in bookmarks appeared message with description: Non-Returning Function Identified with any crackmes.

  • Ghidra's export is not working as you would expect - it's not producing valid file. It's a knows issue (but as I was looking for the issue number I can see you've already went there) - link – Paweł Łukasik Jul 1 '20 at 18:25
  • @PawełŁukasik yes. And in related issue github.com/NationalSecurityAgency/ghidra/issues/… I found related python script for ghidra that helps solve this issue. Also it's looks like that issues like this tracked and should be resolved with related PR: github.com/NationalSecurityAgency/ghidra/pull/1505 – Mikhail Jul 2 '20 at 6:08
  • According to many comments in related issues community around ghidra are waiting for this functionality allowing patching binaries – Mikhail Jul 2 '20 at 6:13
  • If you found a reliable solution I would recommend writing it here as an answer for future seekers. – Paweł Łukasik Jul 2 '20 at 6:55
  • 1
    I’m voting to close this question because this is application-specific behaviour, not reverse-engineering. – peter ferrie Jul 4 '20 at 4:37

While searching solution for my question I found related issue in GitHub repository of project: NationalSecurityAgency/ghidra#issue-19.

According to many comments, community around ghidra are waiting for this functionality allowing patching binaries.

In this comment: NationalSecurityAgency/ghidra/issue-19#issuecomment-560485351 @schlafwandler offers own Python script that should solve the issue and it is works for me on Kali Linux. On Windows 10 I still did not get such problems, so I don't need to use additional tools like this.

Also issue closed with link to related open PR: https://github.com/NationalSecurityAgency/ghidra/pull/1505 (ElfExporter and PeExporter)

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