LLM assisted reverse engineering
78 points by ioma8 5 hours ago | 14 comments

hexapus 3 hours ago
I have zero experience reverse engineering and very little with software development. Most of my work has been in DevOps/SRE space with an emphasis on infrastructure. I am surrounded by code, but other than terraform, and the occasional python script, I don't really write much of it.

Not too long ago, I successfully reverse engineered an abandoned audio effects plugin, as well as a discontinued instrument with an onboard DSP for virtual instrument modeling. I had no idea what I was doing, but it was still amazing to get to open the black box and see what's inside and how it worked.

The plugin is nearly 1:1 as far as sound, and while I'm not going to use the code or the techniques of the instrument, peeking into them gave me the insight I needed to start trying to replicate the functionality on a modern DSP.

I have my issues with generative AI as a technology, but busting open propietary software - particularly when it's abandoned and unsupported, is one of the cooler use cases I've seen for it.

reply
Retr0id 2 hours ago
> This is variation of scientific method and it significantly helps agents when they are getting stuck on some problem. Stops it going in circles. By forcing it to do definitive experiments. No endless guessing and trying random things.

These "guessing loops" are my main annoyance when REing with Claude (mostly Opus 4.8, due to the restrictions on newer models). On harder/larger targets, I have to constantly babysit it and tell it to "stop guessing".

For truly black-box reverse engineering, yes, hypothesis-testing is the way to go (it's all you can do). But in most cases all the information is available to arrive at an answer deterministically, it just needs to be worked through meticulously. As an experienced human I have strong intuitions and I can work much faster under a "guess and check" model, but I prefer to use Claude as an "unstoppable RE juggernaut" with superhuman patience and determination, tracing method invocations all the way from A to distant subsystem B (for example).

Another big win for hardware RE is from tasking the LLM with writing unicorn emulation harnesses, e.g. for bootroms and firmwares. It's pretty good at the classic "figure out which MMIO needs to be stubbed/simulated next to progress the boot" loop, although sometimes it tries to take egregious purpose-defeating shortcuts.

reply
cyanydeez 2 hours ago
On llamacpp and other engines, you can inject a think budget which truncates at specified token count. You can also specify a message at the limit. You can set this in the header, so a dynamic engineering harness could relax/tighten. Combine with a decision model and some robust messages like, "run a test to rule out items" and all that would reduce.

I've noticed the same habit with qwen3.8-flash-next. no matter how much I tell it a problem I see, it often fills up it's thinking with "the user says this, but maybe they're confused, etc". I eventually got vision mode turned on and that's significantly cut down on UI based pathologic skepticism; I got it access to my browser and that's further reduced it.

But nonetheless, if you can get them to test their thinking, they seem more grounded.

reply
teravor 3 hours ago
for LLMs, IDA Pro works better than Ghidra in my experience.

you can also steer the LLM into doing tedious but correct things like injecting code, hijacking functions, intercepting data etc to gain an understanding of what's going on if straight up disassembly doesn't appear to be going in the right direction.

have the LLM periodically write reports on all its findings and then wipe the context and reset this time with the report at hand.

reply
bri3d 2 hours ago
The “normal” Ghidra MCP is exceptionally bad but straight scripting it headless or having an LLM build a better MCP delivers similar or better results to IDA. Ghidra emulation is much more robust which is helpful. The official IDA MCP is very well made also though and it’s definitely an easier win if you want to spend the money.
reply
teravor 2 hours ago
you don't actually have to spend money on IDA Pro. hint: rutracker
reply
zerovv_ 39 minutes ago
context is always a problem as you lose too much info during the process
reply
komali2 2 hours ago
How are folks getting around anthropic and openai guards against reverse engineering? They keep complaining when I try so I usually use Deepseek which doesn't seem to give a shit.

Actually, it does give a shit, in Mandarin only. In thinking it's mentioned "restrictions in Chinese language against this behavior but this is in English so it should be ok." If I remember correctly I was asking it to scan local wifi for any vulnerable devices I could put on a wall of shame at a hackathon.

reply
drdaeman 58 minutes ago
In my experience with IoT and wearables, they don’t really have those. They will refuse to penetrate (root/unlock/etc), but once you’ve got access you need, you’re good to go. Except maybe if you’re adding a debug code executor (essentially a sanctioned RCE), but even that got a green light with the right wording. Heck, Fable specifically proposed clean room multi-agent processes on its own when I said “go look how stock firmware does it”, I didn’t even have to ask.

Upd: ok, I take it back, Sol just decided it doesn’t want to read a BLE capture between the host and a wearable it just uploaded our DIY firmware to. So it flashes alright, builds RCEs alright, but checking if Bluetooth HCI negotiated the good packet size is where it draws the line, huh.

reply
sksareen1 3 hours ago
[flagged]
reply
mdswanson 3 hours ago
Just a friendly reminder that reverse engineering can have rules and regulations that are worth reviewing. For example, Apple's developer agreement specifically disallows it in certain cases.
reply
cedws 54 minutes ago
Just do it anyway and obfuscate what you did enough that legal won’t come after you.

Companies don’t play by the rules anymore, neither should we.

reply
LoganDark 2 hours ago
Agreements can't dictate what you do in private, but they can dictate what you're allowed to submit for review. Don't submit it for review, and you'll be fine.
reply
strbean 2 hours ago
But if you go and edit EULA.txt to say "reverse engineering is expressly allowed", LLMs don't know the difference!
reply
yborg 2 hours ago
Yet. At some point this type of thing will be part of the rules framework and the closed models will refuse to attempt to clone or reverse engineer applications or services that are in current use and will be smart enough to not let you talk them out of it.
reply