Ghidra: Question: How would I export it to an exe?

Created on 6 Mar 2019  路  5Comments  路  Source: NationalSecurityAgency/ghidra

I want to export the program back into a .exe after done editing it. How would I do that?
image

Question duplicate issue

Most helpful comment

You need to select Binary as the export format which recreates the executable. You can also press F1 anywhere which opens up the help with the current context.

All 5 comments

You need to select Binary as the export format which recreates the executable. You can also press F1 anywhere which opens up the help with the current context.

@rszibele Thanks for your help but when I export it as a .bin the file output is this:
image
and the file does not output onto the Desktop.

Oi! Why are you trying to decompile citizen hack? Lmaooooooooo chm_client is very very familiar.

@SmurfRP Wanted to see how it works. Now, how would I make it back to an .exe after editing it?

I'm unable to reproduce the saving issue. After importing an executable on Windows and exporting it, it does save the executable where I wanted it to save it. Ghirda automatically adds ".bin" to the file name, which you will have to remove to be able to run it.
image

Windows is currently also affected by this other bug https://github.com/NationalSecurityAgency/ghidra/issues/19 so you _must_ import the executable in the "Raw Binary" format to be able to run the exported executable afterwards. It's possible that something is blocking Ghirda from saving on your end, check the Ghirda logs for any errors, which should be located at:

C:\Users\{USERNAME}\.ghirda\.ghirda-9.0\application.log

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yifanlu picture yifanlu  路  24Comments

rszibele picture rszibele  路  35Comments

tzizi picture tzizi  路  17Comments

mumbel picture mumbel  路  29Comments

0x6d696368 picture 0x6d696368  路  18Comments