Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ghidra Decompiler Analysis Engine (ghidra-decompiler-docs.netlify.com)
150 points by muizelaar on April 7, 2019 | hide | past | favorite | 30 comments


It looks like they managed to finally get the source code released 2 weeks ago.

https://github.com/NationalSecurityAgency/ghidra

I'm curious as to what prevented them from doing that on day one. Any legal issues presumably would have been worked out prior to the announcement. I guess timelines didn't line up :)


Code arrived on this repo just 4 days ago. Previously, part of the code was released alongside the binary in a tarball.


The wheels of bureaucracy turn slowly


I originally thought it was because they were waiting for the official announcement at the RSA conference before they released the source code but I guess that wasn't it considering it still took them some time.


Amazing. Just what I needed today, when I was writing OpenRisc processor definition for sleigh. :)


In two weekends I've come from no support for OpenRisc at all to this:

https://megous.com/dl/tmp/or1k-dec.png https://megous.com/dl/tmp/or1k-dec2.png

Ghidra is powerful.


What's the difference between OpenRisc and RISC_V?


I don't know. I've only came in contact with some old OpenRisc core, via Allwinner SoCs so far and no RISC-V cpus.


What's sleigh?


Sleigh is the processor specification tool for Ghidra. He’s making it so that Ghidra can work with OpenRISC.


It’s “a machine language translation and disassembly engine”: https://ghidra-decompiler-docs.netlify.com/sleigh.html


How is the experience with Ghidra so far? Does anyone think a true free IDA Pro replacement finally come? I did some reverse engineering for ARM devices last year, and IDA Pro seemed like the only option but it costs around $1000.


Ghidra supports ARM. It is free as in speech and beer, Java (decompiler in C++). From what I heard it phones home though I did not verify the details.

IDA Pro is commercial. Only very limited versions without decompiler are free as in beer for personal use.

You might also be interested in Radare2 (with Cutter being a Chrome frontend). The command line utility r2 even has syntax highlighting.

There are plugins for all of these as well. AFAIK all written in Python.


I'd think the phones home part is an answer many would like to know.


It is hearsay (person from a security firm told me, don't remember which one). I'm very curious about the update mechanism. Either way, as a Java app it should not be too difficult to decompile it.


I regularly look at ARM software and firmware. There are certain things that IDA does better, like FLIRT analysis, which I’ve missed since switching to Ghidra.

Ghidra also currently lacks support for certain ARM instruction decodings so you can get odd looking disassembly. That isn’t to say you can’t add it.

Ghidra has been very nice for reversing C++ code. After filling in most of the members for an object field it makes reversing other subroutines that use the defined type simpler, IMO.


Thx for your opinion. What about automatic ARM-Thumb swap on jump instructions? I tried Radare 2 before and it was so hard to work with ARM firmware. If Ghidra supports a proper ARM-Thumb switch, it sounds like a greate alternative to IDA for me.


I don’t normally see ARM with thumb code so I couldn’t tell you. I am fairly certain it is supported but to what degree I am uncertain.


Mind if I ask how to get started reverse engineering software?


In my experience, find something you want to find out about a software, and then do that. For example I wanted to write an autosplitter (used for speedrunning) for the witcher 3. So I first had to figure out a plan. I found out that witcher3 is heavily based on facts, and fact-changes. If you progress a quest, thats an entry to the fact-database. I went looking for the method which adds facts to the db, and after a while I found it. Then I hooked it (redirected it to a custom function, which calls the original after my custom code executed), and wrote the rest of the autosplitter.


It's open-source, you shouldn't need to decompile it. :)



I think https://news.ycombinator.com/item?id=19315273 is what you were looking for


The sources documented in the original post here (Decompiler Analysis Engine, written in C++) weren't openly published before just 3-4 days ago. The post that was about that event, 3 days ago, got only 7 comments. So HN mostly missed that event until now.

The sources published earlier were the Java sources, and the engine documented here was only in the binary form.


(That’s not a Hacker News thread)


If Ghidra was really good, they wouldn't have had to release the source to it. ;)


It's Java, so it's not all that hard to reverse engineer.


The decompiler is in c++.



Yep!

That's why I stated the language so confidently ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: