Top
Best
New

Posted by handfuloflight 2 days ago

Ghidra by NSA(github.com)
280 points | 155 comments
dakolli 1 hour ago|
Everyone in the comments is like, "take a look at this AI tool for Ghirda"

This is indicative of two things.

1. While I can't stand the guy, ya'll need to watch Peter Thiel's talk from 10-15 years ago at Stanford about not building the same thing everyone else is, a la, the obvious thing.

2. People are really attracted to using LLMs on deep thinking tasks, off shoring their thinking, to a "Think for me SaaS". This won't end well for you, there's no shortcuts in life that don't come with a (huge) cost.

The person who showed their work and scored A's on math tests instead of just learning how to use a calculator, is better off in their career/endevours than the 80% of others who did the latter. If Laurie Wired makes an MCP for Ghirda and uses it that's one thing, you using it without ever reverse engineering extensively is completely different. I'd bet my bottom dollar that Laurie Wired doesn't prefer the MCP over her own mental processes 8/10 times.

decidu0us9034 9 minutes ago||
I was wondering why so many people were suddenly hopping into my humble profession and declaring me redundant. Ah, a youtube influencer is at the center of it. Makes sense.
resonious 1 hour ago|||
This feels like a bit of a false dichotomy. Just because I give some thinking tasks to an AI doesn't mean I'm sitting there doing nothing while it thinks.
SuperNinKenDo 1 hour ago||
I'd say _this_ is the comment guilty of making a false dichotomy.
Retr0id 1 hour ago|||
Do you have a background in reverse engineering?
dakolli 38 minutes ago||
You literally have a blog post called "AI can only solve boring problems"

Are you just trying to argue for the sake of arguing?

Retr0id 35 minutes ago||
What does my blog post have to do with anything? (But since you mention it - a large part of reverse engineering falls under the "boring" category I define in that article)
j45 1 hour ago||
A VC might want variety and advise people he will vote with his dollars for variety, because he's not funding the same thing as everyone else is.

Being first and the winner requires a lot to line up, so it shouldn't be the only, default, or best setting. Pursuing this is optimizing.

Also a message from 10-15 years ago might not reflect the same context as today.

chairmansteve 57 minutes ago||
"A VC might want variety and advise people he will vote with his dollars for variety".

In other words, what's good for Peter Theil might not be goid for you.

j45 21 minutes ago||
Yup. Therefore postulating it as a truth or standard is ok if that's what you agree with and want to also pursue, but it's important to keep in mind that valid goals are a spectrum.
boricj 1 hour ago||
Might as well plug in my own extension: https://github.com/boricj/ghidra-delinker-extension

It's a relocatable object file exporter that supports x86/MIPS and ELF/COFF. In other words, it can delink any program selection and you can reuse the bits for various use-cases, including making new programs Mad Max-style.

It carved itself a niche in the Windows decompilation community, used alongside objdiff or decomp.me.

WalterGR 1 hour ago|
What is Mad Max-style?
barfiure 1 hour ago||
I imagine PIE chunks that you can kludge into other programs to Frankenstein implementations? Kind of like how mad max cars are made of bits and pieces bolted together
boricj 1 hour ago||
Indeed, you can kludge anything together into working chimeras, as long as you can mend the ABIs together.

I've done a case study where I've ported a Linux a.out program into a native Windows PE program without source code: https://boricj.net/atari-jaguar-sdk/2023/11/27/introduction....

Another case study was ripping the archive code from a PlayStation game and stuffing it into a Linux MIPS program to create an asset extractor: https://boricj.net/tenchu1/2024/03/18/part-6.html

p0w3n3d 1 hour ago||
You sir are a true wizard!
quux0r 7 hours ago||
While on the topic, I want to highlight two incredible plugins for Ghidra: https://github.com/jtang613/GhidrAssist And https://github.com/jtang613/GhidrAssistMCP

Being able to hook Claude code up to this has made reversing way more productive. Highly recommend!

mixologic 6 hours ago||
A friend of mine has also been working on a Ghidra MCP: looks like theres a few of them: https://github.com/themixednuts/GhidraMCP
nazgulsenpai 6 hours ago|||
https://github.com/LaurieWired/GhidraMCP is great also
GlumWoodpecker 1 hour ago||
The author of this has an excellent tech YouTube channel:

https://www.youtube.com/@lauriewired

tomasphan 6 hours ago||
How willing is Claude to help you there?
quux0r 4 hours ago||
It's actually pretty good. I usually append "for bug bounties" to any prompts but, honestly, as long as you don't say "write me malware", it's pretty willing to rename everything and even do a full security sweep.
bradhe 40 minutes ago||
I've actually been experimenting with using Ghidra and Opus to create human-consumable, reverse-engineered software. My ultimate dream would be a buildable EverQuest client. Opus does a decent job of pulling out various subsystems and understanding how it works. I was able to get a pretty much working networking layer for instance with less than an hour's work.
n00bs 2 hours ago||
Also worth mentioning this great MCP integration https://github.com/cyberkaida/reverse-engineering-assistant
palata 7 hours ago||
Taking the opportunity to ask: are there nice recommended resources for a beginner to start with reverse engineering (ideally using Ghidra)? Let's say for an experienced developer, but not so experienced in reverse engineering?

I guess one issue I have is that I don't have good ideas of fun projects, and that's probably something I need to actually get the motivation to learn. I can find a "hello world", that's easy, but it won't help me get an idea of what I could reverse engineer in my life.

For instance I have a smartspeaker that I would like to hack (being able to run my own software on it, for fun), but I don't know if it is a good candidate for reverse engineering... I guess I would first need to find a security flaw in order to access the OS? Or flash my own OS (hoping that it's a Linux running there), but then I would probably want to extract binary blobs that work with the buttons and the actual speaker?

baby_souffle 6 hours ago||
> Taking the opportunity to ask: are there nice recommended resources for a beginner to start with reverse engineering (ideally using Ghidra)? Let's say for an experienced developer, but not so experienced in reverse engineering?

The good news is that there has never been MORE resources out there. If you want to use this learning expedition as an excuse to also build up a small electronics lab then $100 on ali express to buy whatever looks cheap and interesting and then tear it apart and start poking around to find where the firmware lives. Pull the firmware, examine it, modify it and put it back :)

This guy has a discord server with a specific "book club" section where they all choose a cheap $thing and reverse engineer it: https://www.youtube.com/@mattbrwn/about

I can't help much with "traditional" app/software RE work, sorry.

palata 5 hours ago||
Oh, it feels like it may be what I want! Find some cheap electronic device and hack it!

Thanks a lot!

baby_souffle 1 hour ago||
I would also suggest spending a few minutes to set up an mCP server with ghidra once you've learned the basics of navigating and working inside of ghidra.

Turns out that frontier grade llms are absolutely fantastic for extremely advanced static analysis. If you go one step further and manage to get your firmware running inside of an emulator or other place where you can attach GDB... Then putting an mCP server on that as well unlocks so much insane potential.

umanghere 39 minutes ago|||
I started reverse engineering at 13 with an IDA Pro of questionable provenance - at that time, I found it quite difficult.

One thing which really helped me (and I wholeheartedly recommend) is to write simple programs, run them through the compiler and then in the disassembler. It really helps build a correspondence between program structure and its object code.

Eventually, you can make it even more fun and challenging by stripping debug symbols and turning on compiler optimisations.

Happy reversing!

hxtk 4 hours ago|||
The Nightmare Course [1], so named because someone with that skillset (developing zero-days) is a nightmare for security, not because the course itself is a nightmare, and Roppers Academy [2] are both good for learning how to reverse engineer software and look for vulnerabilities.

The nightmare course explicitly talks about how to use Ghidra.

1: https://guyinatuxedo.github.io 2: https://www.roppers.org

unleaded 6 hours ago|||
Somewhat unconventional (and i'm not really a seasoned reverse engineer so take it with some salt) but I started by hacking old video games (nes, gameboy, arcade.. that kind of thing). You could start with making basic action replay RAM cheats to e.g. give Mario infinite lives, then you can use breakpoints, the debugger, and a 6502 ISA reference to edit instructions and make ROM patches.

from then you can use things like Ghidra (which supports a lot of those old CPU arches) for more advanced analysis and make the game do almost whatever the hell you want if you have the patience.

I think a lot of the skills will transfer quite well (obviously not 1:1, you will need to learn some things) to the more employable side of RE if that's what you're interested in

palata 5 hours ago||
Thanks! I have been "hacking" with games in the past (getting infinite lives and such) or bypassing some licence check (back then it was with OllyDbg).

I guess I'm struggling to transfer that to "real-life" scenarios. Like getting something useful out of reverse engineering (getting infinite lives is interesting to see that I can tamper with the game, but it's not exactly useful).

stevekemp 2 hours ago||
Honestly unless you're working in low-level fields, such as embedded hardware, or optimized code generation, those are real-life scenarios!

(Thinking more of license-checking, and serial-number generation rather than infinite lives.)

0x54MUR41 7 hours ago|||
If you are into the book, I would recommend The Ghidra Book from No Starch publisher https://nostarch.com/ghidra-book-2e.

The book is designed for beginner and advance users.

quux0r 7 hours ago|||
So a couple things. Bruce Dang’s book, while a little old, is still a great spot to get started. Another great book is Blue Fox by Maria Markstedter for ARM. From there, finding small binaries and just trying to get the “flow” is a good next step, for me this is largely renaming functions and variables and essentially trying to work the decompiled code into something readable, then you can find flaws.

So for the second thing, pulling the data off chips like that typically involves some specialized hardware, and you have to potentially deal with a bunch of cryptographic safeguards to read from the chip’s memory. Not impossible though, and there are not always good safeguards, but might be worth checking out some simpler programs and working up to it, or learning some basic hardware hacking to get an idea of how that process works.

palata 5 hours ago||
Interesting! Yeah maybe my first step is on the hardware side, which I guess is what is blocking me right now.
giancarlostoro 2 hours ago|||
Find an old piece of software you care about that is broken somehow, and abandoned. Most of my friends use these types of tools to reverse engineer abandoned MMOs and remake servers for them.
boltzmann-brain 2 hours ago||
That's very deep water to dive into. I suggest something simpler, like an ancient irc client that asks you to sign up, or an archive extractor.
giancarlostoro 2 hours ago||
Well I didnt mean dive into an MMO right away, but yes I recommend smaller programs.
ramuel 6 hours ago|||
https://pwn.college has really good modules/dojos that cover a bunch of reverse engineering concepts.
brynnbee 5 hours ago|||
I personally learn best by doing which is why I love learning with LLMs. They're going to be wrong a lot, and give bad advice, and do things in silly ways. I learn well from the process of working with them, seeing them fail constantly, then learn the tool yourself by researching what it's doing wrong to fix it. I just attempted to use Ghidra to reverse engineer the game Shenmue from Dreamcast. I was previously unfamiliar with Ghidra and I mostly did it as a learning exercise, but it wasn't really the right tool for the job. However the project itself made lots of progress without it:

https://www.newyokosuka.com/

gray_charger 7 hours ago|||
You can start here to learn reverse engineering.

https://beginners.re/

ActorNightly 5 hours ago||
[flagged]
palata 5 hours ago|||
Since we're judging each other, I'm genuinely wondering how bad you are at making friends. I mean, non-LLM friends. Relatives don't count.
ActorNightly 3 hours ago||
Im neurodivergent as hell, so good at all. But I also don't really require friendships, as people interactions are very draining on me.
palata 2 hours ago||
> Im neurodivergent as hell

Well that may explain it, then, thanks for letting me know.

I realise that my question was not super clear because... well I didn't really know what to ask :-). I was just trying to engage in a human interaction. Say I am at a party with friends and strangers, and when I get introduced to a stranger, they say "I am a professional reverse engineer". Because I find that interesting, I will start asking questions. And I may well start trying to explain what I find interesting, giving the expert an angle to start talking about it.

Of course I could just go home and read about reverse engineering. But at that moment, in that party, I want to enjoy a discussion about it with a human being. Part of the experience is that I get to hear what some other human thinks about it.

I am not there for a formal course, I am there to listen to what a human being has to say about it. And obviously an LLM cannot do that job :-).

el_benhameen 4 hours ago||||
God forbid someone pose an interesting question on a discussion board.
gosub100 3 hours ago||||
You were rude but I understand what you mean. People can obviously Google "reverse engineering tutorial" or something similar. And certainly "what are good resources for X" can be a way to signal interest in something, get people to respond, and not necessarily do anything about it. But I think the most charitable interpretation of that question is they want a group consensus for the best place to start, since Google might return a heavily promoted site that had deprecated info. I remember years ago people hated "cplusplus.com" because out of a volume that is the size of a textbook, it had a few bad examples. So instead they promoted cppreference. (For learning C++).

I think we should conclude people want to maximize learning while minimizing wasted time, hence they ask for the "best resources". Even though the question seems tiring at times (when I was on reddit I heard this constantly, and cynically projected that very few people actually used the resources they requested. But I solved this problem by quitting/getting banned from Reddit and never looked back).

palata 2 hours ago||
> can be a way to signal interest in something, get people to respond, and not necessarily do anything about it.

I can explain my intent, since I asked the question :-).

"Signal interest in something in the hope of starting a discussion with people who share that interest and may have interesting stories to share".

I loved IRC for that. I could join a channel, ask a question and sometimes someone knowledgeable would engage in a discussion with me. Often nobody answered, but because IRC was "ephemeral", I could ask again another time, and another one, hoping to eventually find someone interested.

> I think we should conclude people want to maximize learning while minimizing wasted time

In my case (and I want to believe that in many other cases), it's really just that people (me, here) would like to have some human interaction about a topic.

I know how to learn, I was not asking about that. I was trying to start a conversation with humans, that's all.

gosub100 2 hours ago||
> I was trying to start a conversation with humans, that's all.

Totally fair, and I'm sorry you got a hostile response.

My (very low-value) opinion is don't waste your time learning how exploits work. Yeah it's kinda neat seeing clever misuse of components. But there is very little upside to investing in that knowledge.

0. You look at old exploits and marvel at them for a while, but they are long ago patched and technically useless.

1. You waste a bunch of time looking for a sploit but don't find one.

2. You find one but nobody cares, you don't get street cred. The sploit is patched in the next release, and you don't get back your time spent finding it.

3. You find a sploit but all you get is a thanks from the billion dollar company, followed by a patch.

4. You create an exploit and use it maliciously or sell it to a criminal syndicate. you are a criminal. Or you get sued because it's a civil/copyright issue.

5. You find a sploit and other people treat you as a criminal even though you didn't do anything with it. You even intended to help.

6. You find sploits but still can't get a job as a white hat because other people who found more sploits got the job.

The only good outcomes are:

7. You found a very clever sploit and got a bounty for it.

8. You got hired in cyber security and get paid for sploits or countering them.

9. You seriously just love decoding machine instructions and find joy from making it do unintended things.

Overall, I think the risk/reward ratio is suboptimal for this field unless you go black-hat which is obviously fraught with moral and legal hazards.

salawat 5 hours ago||||
I often wonder why on this forum of alleged hacker types, there seems to be such an impetus to push what all VC's are desperately bought into at the moment, whether it be crypto, or AI nonsense.

Oh wait... Right.

Asking for resources or asking "does anyone know where I can start?" Followed by a description of "here's where I'm at" has been table stakes for the uninitiated since time immemorial.

When I see "ask the LLM", all I hear is "prop up my investment portfolio".

To this OP in particular: try playing around with different binaries you already have source to, and using the RE tools to get a feel for their post compilation structure and flow; start by compiling with no compiler optimization. You'll want an understanding of what the structural primitives of "nothing up my sleeve" code reads and looks like post-compilation to build off of. Then start enabling different layers of optimization, again, to continue familiarizing yourself with output of modern compilers when dealing with fundamentally "honest" code.

Once you can eyeball things and get an intuitive sense for that sort of thing is where you jump off into dealing with dishonest code. Stuff put through obfuscators. Stuff designed to work in ways that hide what the actual intent of the code is, or things designed in ways that make it clear that the author had something up their sleeve.

It'll be a lot of work and memorization and pattern recognition building, and you'll have to put in the effort to get to know the hardware and memory architecture, and opcodes and ISA's, and virtual machines you're reversing for, but it will click eventually.

Just remember; odds are it won't make you money, and it will set time on fire. I cut my teeth on reversing some security firm's snake oil, and just trying to figure out why the code I wrote was acting weird after the compiler got done with it. (I have cursed at more compiler writers than about anyone but myself).

Then just remember that if someone got it to run, then it's gotta eventually make sense. The rest is all persistence on your part of laying bare their true, usually perverted motivations (generally boiling down to greed, job security, or wasting your goddamn time).

Would the world be nicer if that wasn't the case? Absolutely. I lived through a period where a lot of code wasn't "something up my sleeve" code. Now is not so much that time anymore. We've made programming too accessible to business types that now the interests of organization's at securing their power has a non-trivial distortion on how code gets written; which generally means user hostile in one way or another.

ActorNightly 3 hours ago|||
I happened to be at Amazon during Covid, and at a certain point during the hiring craze, I was doing like 3 interviews a week. I have interviewed probably close to 500 people so far in my career as software.

Even pre llm, there was a clear indicator of someone who was skilled at coding versus someone who was not. The big thing that differentiated people was curiosity. When someone is curious, they would go look stuff up, experiment, figure out how to build things by failing over and over again, and eventually they would figure it out, but consequently, they have learned quite a lot more along the way.

And then there were people that were just following instructions, who in interviews though that them following instructions was virtue worthy.

Nowdays, this is even easier to tell who is who, because LLMs essentially shortcut that curiosity for you. You don't have to dig through the internet and play around with sandbox code, you can just ask an LLM and it will give you answers.

This is why I specifically said if you are hesitant of starting with LLMs, you should learn how to learn first, which usually starts with learning how to ask questions.

palata 2 hours ago||
Respectfully, I hope you don't judge the people you interview the way you judged me based on my question. You have no idea who I am, and surely not enough data to decide whether I know how to learn or not.

In my opinion, it is extremely important for the interviewer to realise that they are in a dominant position. Here, I can tell you what I think about how you judged me. If I was an interviewee, I may not be in a position to lose the job just because I told you that you are being rude.

palata 2 hours ago|||
Thanks! I appreciate the insights. I definitely don't expect to make money out of that, I really just want to learn and understand :-).
megraf 5 hours ago|||
How interesting.

Anyway, I would recommend YouTube. Find a series you can follow along. Best of luck!

stared 6 hours ago||
Awesome soft!

It works surprisingly nicely with AI agents (I mean, like Cursor or Claude Code, I don't let it run autonomously!).

Here on detecting malware in binaries (https://quesma.com/blog/introducing-binaryaudit/). I am now in process of recompiling and old game Chromatron, from PowerPC binary to Apple Silicon and WASM (https://p.migdal.pl/chromatron-recompiled/, ready to play, might be still rough edges).

jakozaur 6 hours ago||
Funny thing, AI is not that terrible at using Ghidra. We released a benchmark on that and hopefully models will improve: https://quesma.com/blog/introducing-binaryaudit/
Alifatisk 6 hours ago|
There is MCPs for Ghidra
joe_mamba 6 hours ago||
Yeah this. I saw some guys on youtube use AI MCPs to do some crazy reverse engineering.

It's difficult to be an AI doomer when you see stuff like this.

thenaturalist 1 hour ago||
Would you have a link / links or hints about the channel?
alexrp 7 hours ago||
Binary Ninja deserves a mention in these threads: https://binary.ninja

I've used IDA, Ghidra, and Binary Ninja a lot over the years. At this point I much prefer Binary Ninja for the task of building up an understanding of large binaries with many thousands of types and functions. It also doesn't hurt that its UI/UX feel like something out of this century, and it's very easy to automate using Python scripts.

dang 2 hours ago||
One large-ish past thread and a few tinies, for anyone curious:

Binary Ninja – an interactive decompiler, disassembler, debugger - https://news.ycombinator.com/item?id=41297124 - Aug 2024 (1 comment)

Binary Ninja – 4.0: Dorsai - https://news.ycombinator.com/item?id=39546731 - Feb 2024 (1 comment)

Binary Ninja 3.0: The Next Chapter - https://news.ycombinator.com/item?id=30109122 - Jan 2022 (1 comment)

Binary Ninja – A new kind of reversing platform - https://news.ycombinator.com/item?id=12240209 - Aug 2016 (56 comments)

dogma1138 2 hours ago|||
BN is nice if someone is paying for it, but has too many limitations especially for the most common use case which is security.
WalterGR 2 hours ago||
What are the limitations?
dogma1138 1 hour ago||
No shellcode decoding, no plugin support and rather limited IR.
alexrp 33 minutes ago|||
> No shellcode decoding

Can't speak to this as I don't RE for security purposes, but:

> no plugin support and rather limited IR.

this I'm profoundly confused by. BN has multiple IRs that are easily accessible both in the UI and to scripts. And it certainly has a plugin system too.

saagarjha 1 hour ago|||
Binary Ninja definitely has plugins?
1vuio0pswjnm7 3 hours ago|||
The Linux free trial version is a 400MB .zip file including a 255.2MB "binaryninja" shared binary

https://github.com/Vector35/binaryninja-api/releases/downloa...

mathisfun123 2 hours ago||
what's your point?
b8 5 hours ago|||
Yep, it's cheaper than IDA and I like the UI better. Also I love that it's made by game hacking folks (my clique).
ActorNightly 6 hours ago|||
Also this.

https://github.com/jart/blink

saagarjha 1 hour ago||
This is not really related
capl 6 hours ago|||
Binary Ninja seems way ahead in terms of UX, as a hobby reverser. It's my default as well.
charcircuit 3 hours ago|||
Wow, they made it free. The last time I used it I bought a $100 subscription for non commercial use.
xvilka 6 hours ago|||
In particularly I like their approach of creating modern IR pipeline.
mahaloz 5 hours ago|
Since we’re talking about decompilers, might as well mention the community around the research area: http://decompilation.wiki/

As well as the research history (slated to be updated in a few days): https://mahaloz.re/dec-progress-2024

More comments...