News for hackers. Stuff that matters.
Re:Ghidra Decompiler Analysis Engine by archgoon on Sunday April 07, 2019 @04:48PM (#19599752)
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 :)

Re:Ghidra Decompiler Analysis Engine by Aissen on Sunday April 07, 2019 @05:24PM (#19599979)
Code arrived on this repo just 4 days ago. Previously, part of the code was released alongside the binary in a tarball.
Re:Ghidra Decompiler Analysis Engine by grosswait on Sunday April 07, 2019 @06:24PM (#19600334)
The wheels of bureaucracy turn slowly
Re:Ghidra Decompiler Analysis Engine by drakenot on Sunday April 07, 2019 @06:36PM (#19600395)
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.
Re:Ghidra Decompiler Analysis Engine by megous on Sunday April 07, 2019 @04:39PM (#19599689)
Amazing. Just what I needed today, when I was writing OpenRisc processor definition for sleigh. :)
Re:Ghidra Decompiler Analysis Engine by megous on Sunday April 07, 2019 @10:40PM (#19601528)
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.

Re:Ghidra Decompiler Analysis Engine by person_of_color on Sunday April 07, 2019 @09:53PM (#19601306)
What's the difference between OpenRisc and RISC_V?
Re:Ghidra Decompiler Analysis Engine by megous on Sunday April 07, 2019 @10:38PM (#19601520)
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.
Re:Ghidra Decompiler Analysis Engine by Something1234 on Sunday April 07, 2019 @07:36PM (#19600692)
What's sleigh?
Re:Ghidra Decompiler Analysis Engine by danielvf on Sunday April 07, 2019 @08:17PM (#19600888)
Sleigh is the processor specification tool for Ghidra. He’s making it so that Ghidra can work with OpenRISC.
Re:Ghidra Decompiler Analysis Engine by saagarjha on Sunday April 07, 2019 @09:37PM (#19601240)
It’s “a machine language translation and disassembly engine”: https://ghidra-decompiler-docs.netlify.com/sleigh.html
Re:Ghidra Decompiler Analysis Engine by kbumsik on Sunday April 07, 2019 @11:54PM (#19601892)
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.
Re:Ghidra Decompiler Analysis Engine by Fnoord on Monday April 08, 2019 @11:16AM (#19605937)
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.

Re:Ghidra Decompiler Analysis Engine by yownie on Thursday April 11, 2019 @11:34AM (#19635632)
I'd think the phones home part is an answer many would like to know.
Re:Ghidra Decompiler Analysis Engine by Fnoord on Friday April 12, 2019 @11:43AM (#19645818)
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.
Re:Ghidra Decompiler Analysis Engine by laburn on Monday April 08, 2019 @01:56AM (#19602491)
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.

Re:Ghidra Decompiler Analysis Engine by kbumsik on Monday April 08, 2019 @02:10AM (#19602550)
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.
Re:Ghidra Decompiler Analysis Engine by laburn on Monday April 08, 2019 @08:59AM (#19604751)
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.
Re:Ghidra Decompiler Analysis Engine by archontes on Monday April 08, 2019 @02:07AM (#19602542)
Mind if I ask how to get started reverse engineering software?
Re:Ghidra Decompiler Analysis Engine by thecatspaw on Monday April 08, 2019 @03:36AM (#19602997)
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.
Re:Ghidra Decompiler Analysis Engine by 0x4a42 on Saturday April 13, 2019 @04:51AM (#19651849)
It's open-source, you shouldn't need to decompile it. :)
Re:Ghidra Decompiler Analysis Engine by tango12 on Sunday April 07, 2019 @04:40PM (#19599705)
Re:Ghidra Decompiler Analysis Engine by cthalupa on Sunday April 07, 2019 @06:34PM (#19600385)
I think https://news.ycombinator.com/item?id=19315273 is what you were looking for
Re:Ghidra Decompiler Analysis Engine by acqq on Monday April 08, 2019 @03:02AM (#19602812)
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.

Re:Ghidra Decompiler Analysis Engine by saagarjha on Sunday April 07, 2019 @05:09PM (#19599890)
(That’s not a Hacker News thread)
Re:Ghidra Decompiler Analysis Engine by VikingCoder on Sunday April 07, 2019 @06:45PM (#19600431)
If Ghidra was really good, they wouldn't have had to release the source to it. ;)
Re:Ghidra Decompiler Analysis Engine by saagarjha on Sunday April 07, 2019 @07:08PM (#19600543)
It's Java, so it's not all that hard to reverse engineer.
Re:Ghidra Decompiler Analysis Engine by gpm on Sunday April 07, 2019 @07:43PM (#19600725)
The decompiler is in c++.
Re:Ghidra Decompiler Analysis Engine by archgoon on Sunday April 07, 2019 @09:01PM (#19601089)
Re:Ghidra Decompiler Analysis Engine by gpm on Sunday April 07, 2019 @09:14PM (#19601164)
Yep!

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