News for hackers. Stuff that matters.
Re:IDA cybersecurity software provider Hex-Rays acquired by pseudo0 on Wednesday October 19, 2022 @12:25AM (#33257643)
Hopefully this works out for Hex-Rays, allowing them to invest more into developing IDA and expanding their low-cost product offerings. The general sentiment I have seen among people doing SRE is that IDA is rapidly losing market share to Ghidra. While it excels in some areas, the licenses are pricy even for tech employers, and entirely out of reach for students or colleges. It's hard to convince an employer to fork out cash for IDA licenses when new employees are asking to use Ghidra, because that's what they use at home and at school.
Re:IDA cybersecurity software provider Hex-Rays acquired by rjzzleep on Wednesday October 19, 2022 @12:33AM (#33257703)
For me I got the Company I was contracting for to buy me an IDA license and as I was trying to take over from there Hexrays never responded to any requests.

I'm guessing that I'm on the same pirate blacklist that a lot of people landed. I guess I should have expensed it instead of having the Company buy it. I was the only person doing RE work, it was a single user person license and I was also the only linux user out of that 300 people org.

I think there are a lot of people that would like to pay for IDA but can't get it.

On the other hand I really don't like the Ghidra user experience.

Is there something similar to FLIRT in r2 or ghidra?

Re:IDA cybersecurity software provider Hex-Rays acquired by pseudo0 on Wednesday October 19, 2022 @12:58AM (#33257897)
I don't think Ghidra has a proper FLIRT equivalent yet. That's one of those bells and whistles that may (or may not) be worth the license fee, along with in my opinion a more polished UI.

Just to clarify, if I wasn't concerned with budget and had to pick a product today, I'd still go with IDA, but the mindshare among new hires and interns is swinging pretty rapidly towards Ghidra. If they are able to continue adding features (with US government funding, and open source development), IDA is right to be worried about whether they will still be the best choice in 5 years.

Re:IDA cybersecurity software provider Hex-Rays acquired by ylk on Wednesday October 19, 2022 @01:57AM (#33258286)
It’s not r2 or ghidra, but binary ninja has signature libraries: “The matching algorithm is inspired by FLIRT, which was designed with similar requirements in mind.”

https://binary.ninja/2020/03/11/signature-libraries.html

Re:IDA cybersecurity software provider Hex-Rays acquired by deroad on Wednesday October 19, 2022 @03:54AM (#33258994)
Rizin (and Cutter) does fully support FLIRT. You can create and load them, we also provide sigdb which is a collection of FLIRT files created by us (and yes, they are 100% compatible with IDA if you ever want to use them). - https://github.com/rizinorg/cutter/releases/tag/v2.1.0 - https://github.com/rizinorg/rizin/releases/tag/v0.4.0 - https://github.com/rizinorg/sigdb

beware that these are not the latest versions.

Re:IDA cybersecurity software provider Hex-Rays acquired by rjzzleep on Wednesday October 19, 2022 @04:10AM (#33259106)
Fantastic. So Rizin is a more active fork of r2 + iaito?
Re:IDA cybersecurity software provider Hex-Rays acquired by deroad on Wednesday October 19, 2022 @05:00AM (#33259415)
can't speak for r2, but we are definetely active. The project github page has better details :) But as far as i know rizin is the only tool capable to fully support flirt, and i would love to extend the support even more (and obviously add more features) in both tools (rizin & cutter).
Re:IDA cybersecurity software provider Hex-Rays acquired by grzaks on Wednesday October 19, 2022 @04:35AM (#33259265)
> I think there are a lot of people that would like to pay for IDA but can't get it.

Many years ago we wanted to buy IDA Pro license and were quickly declined because we had whois privacy protection enabled on our domain.

Re:IDA cybersecurity software provider Hex-Rays acquired by TheAdamist on Wednesday October 19, 2022 @06:04AM (#33259884)
Ghidra has function id databases, but only ships with signatures for relatively modern visual studio.

You can create your own signature databases, although i have been unsuccessful in my brief attempts.

The algorithm is different from flirt though.

Its roughly, mask a bunch of stuff (relocations, etc), and hash whats left. There is some parent/child analysis for ambiguous calls i believe.

My recollection is flirt also masks its version of a bunch of stuff, but builds a trie of the first xx bytes with some provision for needed values past that, and some parent child analysis. They have a paper on the algorithm you can google.

Ida ships with more signatures out of the box, In my experience. Although i havent seen them listed anywhere.

Re:IDA cybersecurity software provider Hex-Rays acquired by Test0129 on Wednesday October 19, 2022 @01:29AM (#33258121)
I am not going to hold my breath on extending their hobbyist offerings.

I own a copy of IDA (legally). It was an absolute pain to purchase and it seems that a large portion of their margins are dedicated to piracy control. I won't detail the process...but it seems unusually personal.

If I had to guess they will expand their decompilers (the actual flagship project). It will be years before Ghidra + a community catch up to them and Binary Ninja (I also own a copy of it) may never. The disassembler is just a familiar tool. Their decompilers are way, way far ahead.

Re:IDA cybersecurity software provider Hex-Rays acquired by tralarpa on Wednesday October 19, 2022 @06:06AM (#33259895)
> It will be years before Ghidra

Can you elaborate? I would really like to see what the HexRay decompiler does better (or worse) than Ghidra, but I am too poor to buy it (and dogbolt.org is not interactive, so I cannot edit function signatures to "help" the decompiler etc.).

Is it better in general, for a specific programming language or platform (e.g. C++, Windows), or for a specific use case (e.g. obfuscated code)? I heard about their cloud-based stuff, although I don't know what they are exactly doing there. Maybe ML trained on source code? Function signatures of the latest malware?

After several hundred hours with Ghidra, I think it certainly would need some polishing, in particular:

  - UI. Too many frequently-used dialogs are not optimized for keyboard usage.
  - Decompiler too stubborn sometimes, ignoring user input (e.g. manually specified types).
  - Decompiler needs better heuristics for the treatment of some common cases (e.g., often doesn't recognize for-loops and array accesses)
  - Quite dangerous: Sometimes the decompiler gets lost, especially if a function contains handwritten assembly code with unusual control flows. Okay, can happen. But instead of displaying a warning it just shows you the part it could decompile and you have to figure out by yourself that something is missing.
But most of the above issues are fixable. Instead, I would be interested in learning about more fundamental differences between the two decompilers.
Re:IDA cybersecurity software provider Hex-Rays acquired by roblabla on Wednesday October 19, 2022 @06:23AM (#33260015)
> - Decompiler too stubborn sometimes, ignoring user input (e.g. manually specified types).

This is the thing that sticks out the most IMO. IDA decompiler is quite a bit more flexible than Ghidra's. When you assert a type, it will usually not ignore it. It may sometime get a bit lost if you give conflicting types to dependant variables, but otherwise, it's pretty good at this.

One of the annoying bits of ghidra (though it may have improved, it's been around a year since I last used it) is that there's no way to "split" a variable. Sometimes, ghidra will have some code that looks roughly like:

    int x;

    x = 0;
    doSomething(x);
    x = 1;
    doSomething2(x);
(Obviously, really simplified).

The problem is, sometimes, x needs to be an int for the first function, and a bitflag structure for the second. But Ghidra has no way to say, "hey, from this assignment on, treat `x` as another variable", so you have to either generate a union (ugly) or deal with sending the wrong type (also ugly).

IDA tends to be much better at this. All variables start out as "split" as it can make it (almost in static single assignment form). Then, the user can tell it "Those two variables are actually the same, please treat them as one". I find this flow works really, really well.

Re:IDA cybersecurity software provider Hex-Rays acquired by q3k on Wednesday October 19, 2022 @07:21AM (#33260473)
> is that there's no way to "split" a variable

Right click -> “Split Out As New Variable”, but it seems like this doesn't work for stack reuse yet (just registers, or more generally, simple varnodes).

https://github.com/NationalSecurityAgency/ghidra/issues/2573

Re:IDA cybersecurity software provider Hex-Rays acquired by nyanpasu64 on Wednesday October 19, 2022 @09:29AM (#33261825)
In my experience, in Ghidra you can Ctrl+L to mark a variable as a different type, but retyping or renaming sometimes fails because it creates a HASH variable which sometimes fails to apply to the decompiler output (instead creating a new variable of the right type but the code still references the old wrong one).

Also can I haz offset pointers pretty please? It's not in the last released version I tried, and the last Git version I tried had offset pointers but they didn't affect decompiler output so multiple inheritance and container_of linked lists still came out broken.

Re:IDA cybersecurity software provider Hex-Rays acquired by hoosieree on Wednesday October 19, 2022 @11:05AM (#33263296)
This was my biggest frustration when first using Ghidra (granted, I didn't spend much time reading the documentation before diving in). Big thanks to the people responding to your comment with workarounds!
Re:IDA cybersecurity software provider Hex-Rays acquired by jmillikin on Wednesday October 19, 2022 @07:33AM (#33260615)
The IDA decompiler is just generally more complete and more polished than Ghidra for the architectures it targets.

One issue with Ghidra's that I keep hitting is its poor support for amd64 SIMD. There's a good example at <https://github.com/NationalSecurityAgency/ghidra/issues/249>:

  0000000000000000 <intrinsics>:
     0: f3 0f 1e fa           endbr64 
     4: 0f c6 ca 1b           shufps $0x1b,%xmm2,%xmm1
     8: 0f 58 c1              addps  %xmm1,%xmm0
     b: c3                    retq   
IDA produces great decompilation:

  __m128 __fastcall intrinsics(__m128 a1, __m128 a2, __m128 a3) {
    return _mm_add_ps(a1, _mm_shuffle_ps(a2, a3, 27));
  }
The Ghidra output is a mishmash of CONCAT pseudo-macros.
Re:IDA cybersecurity software provider Hex-Rays acquired by megous on Wednesday October 19, 2022 @08:33AM (#33261186)
OTOH, I was able to add decompiler support for a new architecture (or1k) to Ghidra in two weekends just by following examples and without pre-existent Ghidra internals knowlege and without writing any Java code. To me that's an awesome flexibility.
Re:IDA cybersecurity software provider Hex-Rays acquired by Test0129 on Wednesday October 19, 2022 @10:09AM (#33262427)
Sure, the thing about decompilation is it's by nature taking lossy data and trying to turn it into something that is almost lossless. The working theory of most decompilers, including Ghidra's, is to have a base level of "translation" ability between asm and C (for example). However, there's a ton of stuff that is missed in this base level. Every compiler speaks it's own dialect of assembly, and different compilers prefer different optimizations, code removal, etc as a strategy. As a result a good decompiler also includes heuristics that are expensive to create and learn about. Hex Rays has dedicated an entire company to finding these heuristics in many compilers across many platforms. This isn't knowledge that is easy to acquire or maintain. I think that Ghidra has the right sauce to do it (a large community) but it will be a while before that community can organically produce the same results.

Due to these heuristics IDA produces real actionable code quicker. My experience with Ghidra (less than yours) is that it produces mostly garbage on a lot of different things and it requires a lot of prep work to make truly usable. This might not be noticeable on small or simple binaries but on larger binaries it actually becomes a real measurable problem. While Hex Rays isn't perfect, it's about as close as we can come to it right now and it generates very human-looking code with smart optimization removal. One thing I remember with Ghidra not long ago was a common optimization like using SSE registers for arrays would produce a page worth of non-sense for something simple. Additionally, detection of standard libraries still isn't good so you end up wasting your reversing time on re-reversing a different compilers version of strlen than actually doing the work you need to do. If you could use FLIRT signatures in Ghidra legally I'd imagine Ghidra would be vastly improved.

Re:IDA cybersecurity software provider Hex-Rays acquired by hoosieree on Wednesday October 19, 2022 @11:11AM (#33263377)
My PhD work is about detecting standard library functions in obfuscated/stripped binaries. My most recent model gets about 70% accuracy for a handful of musl-linux-x64 functions. No signatures, just machine learning and disassembly from r2.

I'm not a reverse engineer, but I have been working on this with the assumption that it would be a good time-saver for a reverse engineer. Feel free to DM me if you'd like to discuss.

Re:IDA cybersecurity software provider Hex-Rays acquired by super256 on Wednesday October 19, 2022 @07:20AM (#33260461)
> It was an absolute pain to purchase and it seems that a large portion of their margins are dedicated to piracy control

I know what you mean. I tried to purchase it and got this email:

  Dear Sir/Madam,

  Thank you for your order. Please could you send a copy of your passport and fill out the attached form? Our compliance policy now requires this.  
  Many thanks
  Hex-Rays SA
I used a cracked copy after that.
Re:IDA cybersecurity software provider Hex-Rays acquired by grugq on Wednesday October 19, 2022 @09:14AM (#33261654)
It used to be worse under Pierre. His personal mission in life was to make sure no one dodgy ever got a license and to hunt down every possible source of a cracked copy. My manager had purchased a license for me because it was cheap enough that he could approve it… a year later I tried to renew by emailing Pierre about it. He never replied, instead he contacted my manager to tell him that the license was being pirated and blah blah blah. Was very annoying to sort out.
Re:IDA cybersecurity software provider Hex-Rays acquired by thr0w__4w4y on Saturday October 22, 2022 @05:20PM (#33302342)
Amen. I had a 10-email back-and-forth exchange with Ilfak maybe 10 years ago - multiple times I said "I'm literally begging you to take my money, you don't seem to want it." I am self-employed, we were on the phone with each other in real time, and when I placed with order (with my home address) he said, "Oh, nice home, according to the pictures on Zillow and Google Maps". He sounded like he was trying to startle me, ha ha nice try Ilfak.
Re:IDA cybersecurity software provider Hex-Rays acquired by asmr on Wednesday October 19, 2022 @02:22PM (#33266001)
I find it ironic that they go through such great lengths and their products end up being RE'd and cracked using their product...
Re:IDA cybersecurity software provider Hex-Rays acquired by batch12 on Wednesday October 19, 2022 @07:50AM (#33260762)
I have forced myself to move to other tools like Ghidra, x32dbg, ollydbg, etc. I haven't settled yet on a perfect workflow, but I have found that most of my needs are met without having to launch IDA nowadays.
Re:IDA cybersecurity software provider Hex-Rays acquired by throwup on Wednesday October 19, 2022 @08:34AM (#33261193)
Hasn't ollydbg development stalled? What do you use it for that x64dbg can't also do?
Re:IDA cybersecurity software provider Hex-Rays acquired by crote on Wednesday October 19, 2022 @08:01AM (#33260860)
There have been acquired by a venture capital investor, and the press release mainly focuses on their rapid growth and "extraordinary margins".

I think it is safe to assume that offering cheaper products will be the last thing they are going to do.

Re:IDA cybersecurity software provider Hex-Rays acquired by wongarsu on Wednesday October 19, 2022 @09:05AM (#33261540)
They can have growth and huge margins by offering students a free license that has to be renewed yearly, the way Tableau does; or by giving 80-90% student discounts the way Adobe did before they switched to subscriptions.

But then again those take time to show their benefit, and they probably make piracy easier.

Re:IDA cybersecurity software provider Hex-Rays acquired by dwheeler on Wednesday October 19, 2022 @09:04AM (#33261532)
> The general sentiment I have seen among people doing SRE is that IDA is rapidly losing market share to Ghidra. While it excels in some areas, the licenses are pricy even for tech employers, and entirely out of reach for students or colleges. It's hard to convince an employer to fork out cash for IDA licenses when new employees are asking to use Ghidra, because that's what they use at home and at school.

I don't have formal data, but in my narrow slice of the world that's what I'm seeing as well.

IDA's price is so high that it's easy to justify using Ghidra instead. Heck, if Ghidra does something less well, it might be cheaper to pay to improve Ghidra (and then you can use those improvements forever). I encourage organizations who are thinking of using Ghidra to contribute back to it; if those improvements get integrated back in, then those improvements will continue into the future along with other improvements.

Re:IDA cybersecurity software provider Hex-Rays acquired by bitexploder on Wednesday October 19, 2022 @10:00AM (#33262272)
Ghidra is just better overall now. Full stop. IDA still does some things better, but Ghidra is a great tool and most people still on IDA are there because of their existing tooling, scripts, and experience with the software. Starting from scratch, Ghidra would win. Been using IDA for like 16 years now.
Re:IDA cybersecurity software provider Hex-Rays acquired by Beached on Wednesday October 19, 2022 @10:45AM (#33262988)
ooof, ghidra is great because it is free and works, but I wouldn't call it better. I'd still choose ida or binja over ghidra for work. IDC about license cost, I care about ease of use, and binja wins on ease of use for me (and. alot of people I talk to)
Re:IDA cybersecurity software provider Hex-Rays acquired by rjzzleep on Wednesday October 19, 2022 @10:53AM (#33263111)
I think a lot of the people that say how much better ghidra is, just started reversing and use the decompiler a lot. The workflow and UX of IDA is so much better.

I guess there are a lot of people that just click around in the UI but for a keyboard based workflow, Ghidra has a lot of catching up to do even to IDA 4.x.

Re:IDA cybersecurity software provider Hex-Rays acquired by blincoln on Wednesday October 19, 2022 @11:57AM (#33264046)
I've been doing RE work off and on for about twenty years. IDA is a solid tool with some really neat features[1], but the only reason I use it anymore is if I need to look at a binary that's for an architecture so obscure that Ghidra doesn't support it yet.

I like Ghidra's interface better, but I'm also not a keyboard-first type of user. I work with a lot of different OSes and software. I stopped trying to remember most keyboard shortcuts 10+ years ago, because there were too many variations, and the consequences of using the wrong one can be dire.

Releasing and open-sourcing Ghidra was a truly magnificent gift by the NSA, and I can't thank them enough for it.

[1] I'd love to see a Ghidra equivalent of Lumina, for example.

Re:IDA cybersecurity software provider Hex-Rays acquired by kuroguro on Wednesday October 19, 2022 @01:12PM (#33265085)
There's an open source Lumina server, writing a plugin for Ghidra wouldn't be too difficult, here's some details on how they hash functions:

https://github.com/naim94a/lumen/issues/2

Re:IDA cybersecurity software provider Hex-Rays acquired by bitexploder on Wednesday October 19, 2022 @02:59PM (#33266441)
I have not done it full time, but I find IDA is only useful for niche processors and out of the way things. I have still done it deeply and consistently for the last 16 years. For day to day use Ghidra is just better for me and I went pretty deep into the IDA well with tooling and Python scripting. Decompiler, yes, but it really depends on what features you need and what processor architectures you are reversing. IDA is still the most versatile and indispensable for some tasks, but that is not the majority of my work or interests these days and when it is, right tool, right job, etc.

Arguments of keyboard/mouse efficiency are dead to me. The limiting factor of any reverse engineering is definitely not how efficiently you can keyboard navigate a UI. People are too in love with efficiency of the wrong things and not what the real limiting factors of reversing are, which is comprehending the program. I don't love clicking around but it has never once slowed me down on a project.

Re:IDA cybersecurity software provider Hex-Rays acquired by bitexploder on Wednesday October 19, 2022 @03:05PM (#33266513)
Stuff like IDA refusing to have an undo feature and other dumb stuff until the market forced them to. No reason for it, just Ilfak's insistence on an outmoded philosophy of software design that does not benefit users. I do like Binja but Ghidra is free and works. I think Binja has the edge on the highest end features now. I have and use both. I like getting a second opinion on disassembly anyway. Some times they are just wrong and one tool catches something another doesn't. Can't count the hours lost to poor disassembly. Correctness is probably one of the most important features of any disassembler and reverse engineering tool.
Re:IDA cybersecurity software provider Hex-Rays acquired by maldev on Wednesday October 19, 2022 @12:53PM (#33264847)
There's also competitors like Binary Ninja. Ida is best at Mac/ios and Windows by far though, so it's still used in those spaces alot. But for embeded, linux and whatever else, Ghidra/Binja are good enough that employers literally won't buy it anymore and are refusing it to senior engineers and telling them to use something else.
Re:IDA cybersecurity software provider Hex-Rays acquired by macjohnmcc on Wednesday October 19, 2022 @12:56PM (#33264889)
I love IDA but it is too rich for my blood so I have gone with Binary Ninja. Not perfect but continually evolving.