Live data from Hacker News

Ghidra, NSA's reverse-engineering tool

nsa.gov

171–180 of 425 posts

Re: Ghidra, NSA's reverse-engineering tool

#171
post #37

Earlier quoted context omitted.

> Ghidra has a lot of really cool features that IDA Pro doesn't, such as decompiling binaries to pseudo-C code. To be fair, IDA Pro has a decompiler plugin to do this.

For which they charge a per-CPU fortune https://www.hex-rays.com/cgi-bin/quote.cgi

$4k/cpu/year is really not very expensive at all for industry-leading niche software.

Good comparison might be Synopsys VCS. Prices are not published but I believe they are over $30k/cpu/year and for larger designs you really want a big sim server.

Re: Ghidra, NSA's reverse-engineering tool

#172

I'm curious what feature specifically prompted the NSA to develop their own IDA Pro alternative. I mean, someone somewhere at the NSA must have been trying to do something with IDA Pro only to repeatedly fail before the decision was made that whatever the NSA was trying to do warranted developing their own IDA Pro... right? Or perhaps they used IDA Pro so often and grew so frustrated by it that they started their own…

A few reasons I can think of:

1. Collaborative.

2. supporting classified proprietary architectures (think missile chips or something)

3. The intermediate representation (architecture independent representation of code) can be integrated in to many other classified tools. Maybe for automated analysis for example.

Re: Ghidra, NSA's reverse-engineering tool

#173
post #127

Earlier quoted context omitted.

IDA Pro is not expensive at all for serious professionals in the field. Other common software in the industry costs way more. Nessus is $2k a year, Metasploit like $1500 to $15000, and Core Impact is $30k and up. If this is expensive to you, then it’s not for you. This is for people who are making real money with these tools, not hobbyists dicking around.

> If this is expensive to you, then it’s not for you. This is for people who are making real money with these tools, not hobbyists dicking around. That's an odd perspective. Imagine if this type of sentiment were applied to paint brushes. There is a lot of useful work that is not economically viable per se, and to discount that and to be pejorative feels wrong.

If you are using these tools you are either defending systems from threats or breaking into systems and making money through illegal activities. There is not really any other useful work you can do with these tools.

I don’t see how the perspective is odd. Having tools like Core Impact and the knowledge of how to use them well can propel you to a six figure income easily. On top of that these tools are also business expenses you can use for tax write offs.

They are certainly worth the investment. The only people who see the price as steep are those who cannot see any viable way to make a decent ROI off them.

Re: Ghidra, NSA's reverse-engineering tool

#174
post #168

Earlier quoted context omitted.

No, you almost certainly promised not to do so when you bought a licence.

Ghidra on the other hand you could, since even if they never get around to fully releasing the source (unlikely) they still granted us an apache license on the whole thing :) I think it's probably pretty unique right now in that it's under an OSS license without all the source available.

Ghidra is mostly Java, so decompilation would pretty high-fidelity to begin with.

Re: Ghidra, NSA's reverse-engineering tool

#175
post #168

Earlier quoted context omitted.

No, you almost certainly promised not to do so when you bought a licence.

Ghidra on the other hand you could, since even if they never get around to fully releasing the source (unlikely) they still granted us an apache license on the whole thing :) I think it's probably pretty unique right now in that it's under an OSS license without all the source available.

All the source is in .zip files in the download. What's missing (and coming soon) is a build system.

Re: Ghidra, NSA's reverse-engineering tool

#176
post #168

Earlier quoted context omitted.

Ghidra on the other hand you could, since even if they never get around to fully releasing the source (unlikely) they still granted us an apache license on the whole thing :) I think it's probably pretty unique right now in that it's under an OSS license without all the source available.

Ghidra is mostly Java, so decompilation would pretty high-fidelity to begin with.

The java sources seem to all be there in zip files actually (as far as I can tell). The part I was most interested in atm (the decompiler) turns out to be some sort of native language compiled to an executable, and its source isn't there.

Re: Ghidra, NSA's reverse-engineering tool

#177
post #157

Earlier quoted context omitted.

Toll bridges are quite rare. Most bridges are publicly funded via taxes and free to use, just like Ghidra.

Speak for yourself, I pay a fortune in tolls.

Time to stop driving the Mass Pike (I know, regional humor/rant.)

Re: Ghidra, NSA's reverse-engineering tool

#178

I'm curious what feature specifically prompted the NSA to develop their own IDA Pro alternative. I mean, someone somewhere at the NSA must have been trying to do something with IDA Pro only to repeatedly fail before the decision was made that whatever the NSA was trying to do warranted developing their own IDA Pro... right? Or perhaps they used IDA Pro so often and grew so frustrated by it that they started their own…

Hex-Rays can be hard to deal with, and the IC deals pretty extensively with large federal contractors like Raytheon, so it's possible they just needed something as capable as IDA that they could roll out across all their suppliers to use as a common toolchain and interchange format. But it's also possible this is just sort of a labor of love type thing.

There’s a third possibility: they wanted a piece of software they could customize to meet their needs. Admittedly, for simple bugfixes and the like, Hex-Rays’ support is known for being quite responsive (as suits the small number of customers). There’s also a quite large (albeit poorly-documented and crash-prone) SDK, which can handle a wide variety of needs and has gained functionality over time. But if you want to add new functionality that can’t be implemented using the SDK? (That includes just about anything related to the decompiler.) You’re at the mercy of Ilfak’s priority list. Well, mere mortals are, at least; the NSA has enough money that it might be able to set up some sort of special contract with Hex-Rays, but I suspect that’s easier said than done.

From that perspective, the ideal is what the NSA ended up with, a codebase whose development is fully in-house. Notably, though, second best would be to just have access to the source code of an existing tool, so you can at least make your own patches if necessary, even if you’re not in control of the codebase’s overall direction. Did the NSA ever seek that in IDA’s case, and could they have obtained it if they did? I don’t know the answer to either question… but source access certainly isn’t offered to typical customers. In general I’m surprised that “paid + source access for customers” isn’t a more popular model of software development.

From my perspective, which admittedly is very different from the NSA’s, I was never very interested in low-cost IDA competitors like Hopper or Binary Ninja, but I’m very excited about Ghidra. Why? Partly because it’s a more full-fledged competitor in terms of feature set, I admit – but the competitors I mentioned are bound to narrow the gap over time. Partly because of cost: I myself am at a point where I could justify the $600/y for Binary Ninja’s commercial edition, or even the order-of-magnitude-higher cost of the Hex-Rays decompilers, without wincing too badly. but I believe that reverse engineering should be accessible to beginners and amateurs. (Piracy is a partial solution, including in IDA’s case, but some people don’t like to do that.).

But the main reason I’m excited about Ghidra is that I have the source code. As a concrete example, I’ve spent a good amount of time reverse engineering software for the Nintendo Wii and Wii U. Both consoles have a main CPU based on the PowerPC architecture, but with a custom ISA extension for an extremely barebones version of SIMD. Well, both Hex-Rays and Ghidra support PowerPC decompilation (although that’s a relatively recent development), but unsurprisingly, neither of them have full support for that ISA extension. IDA actually does have built-in support for disassembling it, but AFAIK not for decompiling; Ghidra doesn’t seem to support it at all (but I may just need to configure it properly). What can I do? Well, in practice, nothing, because I don’t care about the Wii U anymore. But if Ghidra had been released a few years ago, I’m pretty sure I would have gone and implemented support for the extension myself; I haven’t looked at Ghidra’s source yet, but since it already supports other vector ISAs, it probably wouldn’t be that hard. With IDA, I was stuck. The SDK supports adding custom instruction sets for disassembly, but the decompiler SDK is so limited that supporting them there is either impossible or at least would be a huge hack.

And that’s just one of many customizations I‘ve wanted over the years. Some of them are probably easier said than implemented, but at least now I can put that to the test!

Re: Ghidra, NSA's reverse-engineering tool

#179

Earlier quoted context omitted.

It's part of the NSA's recruiting push. "If you are interested in projects like this ... consider applying" is even mentioned in the README. There's zero chance there's some secret trojan, because the people who are interested in this type of software are the exact people who would be able to find it.

An RCE vulnerability has already been found.

Despite what @HackerFantastic is going on about, sloppy remote debugging capabilities enabled with a debug flag isn't an RCE.

Re: Ghidra, NSA's reverse-engineering tool

#180
post #25

Earlier quoted context omitted.

Bad actors have had access to this tool too... it was leaked previously. This is cool because: - It's legal and free - It's open source

The tool was never leaked previously.

Uh, you're sure about that? I can't say I have first hand experience with the leak (running second hand NSA software not meant for public release seems like a bad idea somehow) but I know I've heard that it was, and this seems pretty suggestive...

https://wikileaks.org/ciav7p1/cms/page_51183656.html

Post reply on HN