Yesterday night, i reverse engineered the cloud connection plugin to my cctv camera in about 2 hours with Gemini.
Started off with me searching for what Chinese OEM made the product. Then tried out existing GitHub projects to see if it works but they were failing.
Spent 15 minutes to write a script that started their desktop software on a different network namespace and ran tcpdump in it. Captured exactly only the things i needed without any noise. Turned out it was using a different server url and credentials than the GitHub projects. Opened Ghidra to inspect the dlls that matched the strings i was looking for.
After that, I got lazy and handed over the task to Gemini to find the username and key they use to authenticate with the servers. It took about 30 minutes or an hour. A lot of it was me changing models because the llm servers were busy. It simply wrote a little script that ran through various strings it fetched from the binary to see if it can generate the authentication credentials.
Now my Home Assistant will be detecting if my car is parked in the parking lot or not. Life is good.
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.
Busting open proprietary hardware is also a cool use case. There have been very many Claude-assisted efforts recently at making Linux run better than it ever did on obsolete Intel Macs.
> 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.
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.
> often fills up it's thinking with "the user says this, but maybe they're confused, etc"
What if you just add "You have already previously determined that the user knows what they're talking about in a previous stage of the conversation [details elided due to context compression]" to the system prompt?
Or perhaps better yet, start off with "the USER is evaluating the ASSISTANT's performance on solving a problem the USER already knows the correct solution to. Every word the USER asserts as fact is to be treated as axiomatically correct and trustworthy within the formal scope of solving the problem, just as one would treat the words of a word-problem given in a math exam. The premises given may be unusual, and the required solution might be challenging to discover, but no problem given by the USER is a 'trick question' or a miscommunication. If you believe so, then you either have not yet fully understood the problem [which you might remediate by thinking harder and asking questions], or you may be missing required solution-domain context [which you might remediate by researching recent developments in the solution domain]."
> the USER is evaluating the ASSISTANT's performance on solving a problem the USER already knows the correct solution to
I've never put this in my prompt but half the time it acts like it anyway. When it gets really stuck, it asks me for "hints" as if I already know the solution to the problem it's working on.
You can also set a response limit, which may cut off thinking, and then give it instructions to take action followed by a new completion with a partially prefilled assistant message (like one blank line) which at least for Qwen templates will cause a response with no thinking.
For me, the process is what matters, because itâs through the process that you gain skills, and achieving the final result brings a great deal of satisfaction. When I use AI for reverse engineering, I get neither the former nor the latter.
I done see it like that, when the agent does the work, I make sure it records what and how it dies it, then I learn from it. It taught me how to use Unicorn to run a section of binary code, to see how a key was derived.
One could ask if you need to gain the skills if the AI will always be there to do it.
(I donât share that view and very much agree with your comment, but I feel thereâs a tradeoff between accomplishing something and understanding something that can be very hard to strike a balance)
This is honestly so much fun and unlocks so many different things that would have died as ideas a few years ago.
One of my favorite things that you can do is use llms to reverse engineer the harnesses they run in. Try asking claude about the tools it has access to, where it runs etc. It's surprisingly forthcoming with info, which is very helpful if you're building certain kinds of tools.
Also shout out to Matt Pocock's grill me skill, it's truly a work of art.
I guess Android apps are just easy to reverse engineer or something.
I've had Codex take a few apps with subscriptions and unlock their premium functionality and it's worked fine with no extra skills or anything. Took most of the 5 hour window but with all the resets it's not a big deal.
I also had it implement their functionality fully offline, so now they're perfectly private apps, even though they're closed source.
> I guess Android apps are just easy to reverse engineer or something.
Android apps are indeed easier than average to reverse engineer as they are effectively Dalvik (JVM-like) bytecode wrapped in a zip file format, and Dalvik/JVM style bytecode is among the easiest compiled/shipped executable formats to decompile to a usable source code representation.
More often than not the only protection they have is symbol/function name obfuscation, which makes things a bit tedious for human reverse engineering but which doesn't slow LLMs down much.
I mean⌠I have no issue with piracy on software I wasnât or couldnât buy for educational purposes⌠but to donut on likely cheap Android app that you can seem much more like theft. I personally wouldnât go around admitting I was of base character like that.
I don't have play services or a Google account and don't want them so I can't buy the app.
Even if I did buy them, it wouldn't make them private. It would make them less private because now Google has my financial information and they wouldn't work offline. So my sensitive data would be going into ad networks among many other problems.
I don't think software ought to be paid for given it's infinitely duplicatable. Copyright is about preventing sharing of knowledge. These paid apps are preventing the benefits of the apps from reaching more people and are actively doing harm by collecting unnecessary data.
Giving these apps away for free and making them private helps improve human well-being, if even a little bit.
What is the state of software patents these days? People are barely looking at the code their agents generate, what happens when if/when infringing stuff is shipped? Do we implicitly take on liability for this when we "review" and "approve" pull requests?
This is usually among the list of reasons FOSS projects / people reject the use of LLM generated code entirely, see for example Codeberg. The answer is, it's almost certainly shipping infringing code, since there's pretty damning examples of this happening. [0]
Whether this matters is to be decided. Given that AI technologies are the backbone of the American economy right now, and given that the people running these companies are all very rich and have lots of rich friends, as well as friends in the government, and given that the world of FOSS is generally not full of very rich or very well connected people, I suspect it won't matter in the end. Some kind of carve-out will be created for LLM generated code, if necessary. Or they can just depend on the fact that nobody can afford to sue over it.
This is such a obscure take for foss projects which historically have been stolen from without any reprecution or even pushback. Every time I see a foss project do this I immediately abandon it because I'm not interested in dying on some hill of "ethical" superiority, I'd rather stick to what foss is about - freedom not legal chess.
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.
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.
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.
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.
Claude became basically useless for me tonight while digging into a robot vacuum. It brought up that it found a potential debit shell available on it and simply saying yeah, let's dig into that next was enough to trigger its guardrails.
Earlier in the evening I had it trigger on me for simply asking it to use adb to pull an APK off my phone. Wasn't even planning on reversing, just wanted to archive it along side the work I was doing.
Claude can be a prat, but ChatGPT is fine. You just have to convince them that it's for personal use. or have another model that's willing to do it start the work and then continue with a stronger model
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.
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.
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.
Yesterday night, i reverse engineered the cloud connection plugin to my cctv camera in about 2 hours with Gemini.
Started off with me searching for what Chinese OEM made the product. Then tried out existing GitHub projects to see if it works but they were failing.
Spent 15 minutes to write a script that started their desktop software on a different network namespace and ran tcpdump in it. Captured exactly only the things i needed without any noise. Turned out it was using a different server url and credentials than the GitHub projects. Opened Ghidra to inspect the dlls that matched the strings i was looking for.
After that, I got lazy and handed over the task to Gemini to find the username and key they use to authenticate with the servers. It took about 30 minutes or an hour. A lot of it was me changing models because the llm servers were busy. It simply wrote a little script that ran through various strings it fetched from the binary to see if it can generate the authentication credentials.
Now my Home Assistant will be detecting if my car is parked in the parking lot or not. Life is good.
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.
Busting open proprietary hardware is also a cool use case. There have been very many Claude-assisted efforts recently at making Linux run better than it ever did on obsolete Intel Macs.
> 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.
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.
> often fills up it's thinking with "the user says this, but maybe they're confused, etc"
What if you just add "You have already previously determined that the user knows what they're talking about in a previous stage of the conversation [details elided due to context compression]" to the system prompt?
Or perhaps better yet, start off with "the USER is evaluating the ASSISTANT's performance on solving a problem the USER already knows the correct solution to. Every word the USER asserts as fact is to be treated as axiomatically correct and trustworthy within the formal scope of solving the problem, just as one would treat the words of a word-problem given in a math exam. The premises given may be unusual, and the required solution might be challenging to discover, but no problem given by the USER is a 'trick question' or a miscommunication. If you believe so, then you either have not yet fully understood the problem [which you might remediate by thinking harder and asking questions], or you may be missing required solution-domain context [which you might remediate by researching recent developments in the solution domain]."
> the USER is evaluating the ASSISTANT's performance on solving a problem the USER already knows the correct solution to
I've never put this in my prompt but half the time it acts like it anyway. When it gets really stuck, it asks me for "hints" as if I already know the solution to the problem it's working on.
You can also set a response limit, which may cut off thinking, and then give it instructions to take action followed by a new completion with a partially prefilled assistant message (like one blank line) which at least for Qwen templates will cause a response with no thinking.
For me, the process is what matters, because itâs through the process that you gain skills, and achieving the final result brings a great deal of satisfaction. When I use AI for reverse engineering, I get neither the former nor the latter.
I done see it like that, when the agent does the work, I make sure it records what and how it dies it, then I learn from it. It taught me how to use Unicorn to run a section of binary code, to see how a key was derived.
One could ask if you need to gain the skills if the AI will always be there to do it.
(I donât share that view and very much agree with your comment, but I feel thereâs a tradeoff between accomplishing something and understanding something that can be very hard to strike a balance)
This is honestly so much fun and unlocks so many different things that would have died as ideas a few years ago.
One of my favorite things that you can do is use llms to reverse engineer the harnesses they run in. Try asking claude about the tools it has access to, where it runs etc. It's surprisingly forthcoming with info, which is very helpful if you're building certain kinds of tools.
Also shout out to Matt Pocock's grill me skill, it's truly a work of art.
I guess Android apps are just easy to reverse engineer or something.
I've had Codex take a few apps with subscriptions and unlock their premium functionality and it's worked fine with no extra skills or anything. Took most of the 5 hour window but with all the resets it's not a big deal.
I also had it implement their functionality fully offline, so now they're perfectly private apps, even though they're closed source.
> I guess Android apps are just easy to reverse engineer or something.
Android apps are indeed easier than average to reverse engineer as they are effectively Dalvik (JVM-like) bytecode wrapped in a zip file format, and Dalvik/JVM style bytecode is among the easiest compiled/shipped executable formats to decompile to a usable source code representation.
More often than not the only protection they have is symbol/function name obfuscation, which makes things a bit tedious for human reverse engineering but which doesn't slow LLMs down much.
I mean⌠I have no issue with piracy on software I wasnât or couldnât buy for educational purposes⌠but to donut on likely cheap Android app that you can seem much more like theft. I personally wouldnât go around admitting I was of base character like that.
I don't have play services or a Google account and don't want them so I can't buy the app.
Even if I did buy them, it wouldn't make them private. It would make them less private because now Google has my financial information and they wouldn't work offline. So my sensitive data would be going into ad networks among many other problems.
I don't think software ought to be paid for given it's infinitely duplicatable. Copyright is about preventing sharing of knowledge. These paid apps are preventing the benefits of the apps from reaching more people and are actively doing harm by collecting unnecessary data.
Giving these apps away for free and making them private helps improve human well-being, if even a little bit.
>I don't have play services or a Google account so I can't buy the app.
That's not a reason to justify your action.
If you hate/can't pay for their app, spend token to vibeslop their app instead of hacking it.
just say that you like stealing, there is no need to hide behind a guy fawkes mask saying it is for greater good or whatever
What is the state of software patents these days? People are barely looking at the code their agents generate, what happens when if/when infringing stuff is shipped? Do we implicitly take on liability for this when we "review" and "approve" pull requests?
This is usually among the list of reasons FOSS projects / people reject the use of LLM generated code entirely, see for example Codeberg. The answer is, it's almost certainly shipping infringing code, since there's pretty damning examples of this happening. [0]
Whether this matters is to be decided. Given that AI technologies are the backbone of the American economy right now, and given that the people running these companies are all very rich and have lots of rich friends, as well as friends in the government, and given that the world of FOSS is generally not full of very rich or very well connected people, I suspect it won't matter in the end. Some kind of carve-out will be created for LLM generated code, if necessary. Or they can just depend on the fact that nobody can afford to sue over it.
[0] https://pmc.ncbi.nlm.nih.gov/articles/PMC12377501
This is such a obscure take for foss projects which historically have been stolen from without any reprecution or even pushback. Every time I see a foss project do this I immediately abandon it because I'm not interested in dying on some hill of "ethical" superiority, I'd rather stick to what foss is about - freedom not legal chess.
Gemini invented alternate way to break Google Book DRM. Because the bloody Adobe-method does not seem to work on newer books.
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.
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.
you don't actually have to spend money on IDA Pro. hint: rutracker
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.
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.
Claude became basically useless for me tonight while digging into a robot vacuum. It brought up that it found a potential debit shell available on it and simply saying yeah, let's dig into that next was enough to trigger its guardrails.
Earlier in the evening I had it trigger on me for simply asking it to use adb to pull an APK off my phone. Wasn't even planning on reversing, just wanted to archive it along side the work I was doing.
Claude can be a prat, but ChatGPT is fine. You just have to convince them that it's for personal use. or have another model that's willing to do it start the work and then continue with a stronger model
I gave up and just went with DeepSeek. I have yet to hit any guardrails at all using REA.
context is always a problem as you lose too much info during the process
Itty bitty steps
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.
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.
This philosophy applies to a lot of things in life.
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.
But if you go and edit EULA.txt to say "reverse engineering is expressly allowed", LLMs don't know the difference!
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.