Yes, Claude Code can decompile itself. Here's the source code
Geoffrey Huntley discusses Claude Code, an AI coding tool capable of self-decompilation, highlighting ethical concerns, LLM effectiveness in coding tasks, and the broader implications for software engineering.
Read original articleGeoffrey Huntley discusses the capabilities of Claude Code, an AI coding tool that can decompile itself and assist in software development. He highlights the ethical concerns surrounding AI alignment and safety, particularly in the context of using AI for potentially harmful tasks. Huntley shares his experiences with AI language models (LLMs) and their effectiveness in tasks like deobfuscation and transpilation, noting a significant moment of realization during his exploration of software development. He provides insights into the structure of Claude Code, which is built in TypeScript and available on GitHub, although the actual source code is currently not accessible. Huntley outlines a process for decompiling and understanding the application, emphasizing the need for patience and encouragement when using LLMs for complex tasks. He concludes by mentioning the broader implications of these technologies, suggesting that similar techniques can be applied across various programming languages and even to binary files, showcasing the transformative potential of AI in software engineering.
- Claude Code can decompile itself and assist in coding tasks.
- Ethical concerns exist regarding AI alignment and safety.
- LLMs are effective in deobfuscation and transpilation tasks.
- The source code for Claude Code is currently unavailable.
- Techniques discussed can be applied to various programming languages and binaries.
Related
Claude 3.5 Sonnet
Anthropic introduces Claude Sonnet 3.5, a fast and cost-effective large language model with new features like Artifacts. Human tests show significant improvements. Privacy and safety evaluations are conducted. Claude 3.5 Sonnet's impact on engineering and coding capabilities is explored, along with recursive self-improvement in AI development.
Ask HN: Am I using AI wrong for code?
The author is concerned about underutilizing AI tools for coding, primarily using Claude for brainstorming and small code snippets, while seeking recommendations for tools that enhance coding productivity and collaboration.
Up to 90% of my code is now generated by AI
A senior full-stack developer discusses the transformative impact of generative AI on programming, emphasizing the importance of creativity, continuous learning, and responsible integration of AI tools in coding practices.
ZombAIs: From Prompt Injection to C2 with Claude Computer Use
Anthropic's Claude Computer Use enables AI to control computers, raising security concerns. An experiment demonstrated prompt injection to execute malware, highlighting risks and the need for caution with autonomous AI systems.
An "oh fuck" moment in time
Geoffrey Huntley highlights the growing importance of software assistants in coding, sharing his successful experience with a tool that converted a Rust library to Haskell, emphasizing the industry's divide on adoption.
> Several critics seemed to assume I claimed Claude had "decompiled" the executable in the traditional sense. In reality, as I described in our conversation, it analyzed visible strings and inferred functionality - which is still impressive but different from true decompilation.
So I’m not sure that the implications are as big as the article author is claiming. It seems Claude is good at de-minifying JavaScript but that is a long way away from decompiling highly optimized binary code.
So why would the blue teams care beyond "oh fun, a new tool for speeding up malware decompilation"?
Edit: To be clear, I get the new reverse engineering and reimplementation possibilities got much better and simpler. But the alarmist tone seems weird.
> Systemically, I'm concerned that there is a lack of professional liability, rigorous industry best practices, and validation in the software industry which contributes to why we see Boeings flying themselves into the ground, financial firms losing everyone's data day in and out, and stories floating around our industry publications about people being concerned about the possibility of a remotely exploitable lunar lander on Mars.
> There's a heap of [comical?] tropes in the software industry that are illogical/counterproductive to the advancement of our profession and contribute to why other professions think software developers are a bunch of immature spoiled children that require constant supervision.
3 weeks ago you posted something titled "The future belongs to people who can just do things".
Today you post this:
> Because cli.mjs is close to 5mb - which is way bigger than any LLM context window out here. You're going to need baby sit it for a while and feed it reward tokens of kind words ("your doing good, please continue") and encourage it to keep on going on - even if it gives up. It will time out, lots...
I don't think you are someone who can just "do things" if you think a good way to de-obfuscate 5MB of minified javascript is to pass it to a massive LLM.
Do you think you are advancing your profession?
At no point in this process does the author seem to stop and inspect the results to see if they actually amount to what he’s asking for. Claiming that this output represents a decompilation of the obfuscated target seems to require at least demonstrating that the resulting code produces an artifact that does the same thing.
Further, the claim that “Using the above technique you can clean-room any software in existence in hours or less.” is horrifyingly naive. This would in no way be considered a ‘clean room’ implementation of the supplied artifact. It’s explicitly a derived work based on detailed study of the published, copyrighted artifact.
Please step away from the LLM before you hurt someone.
Asking it for its source code (AI never lies, right?) and then buying it on your personal card so corporate security doesn’t know what you’re doing makes me feel a lot better about it.
If you had it generate tests then handed the tests off to a second agent to implement against...
This reads to me like "Please understand that legal protections no longer matter because computers can now break the law for you automatically".
The AI has just made educated guesses about the functionality, wrote some sensible-looking code and hallucinated a whole lot.
The provided code on GitHub does not compile, does not work in the slightest, does not include any of the prompts from the original source, does not contain any API URLs and endpoints from the original, and uses Claude 3 Opus! And this is just from a cursory 5-minute look.
I’m pretty sure translation of a text into another language would still count as copyright infringement. It may be hard to prove, but this isn’t a copyright bypass.
All they've done so far is add an unnecessary step by putting a bounty on who will be the first to extract all the prompts and the agent orchestration layer.
> This is the meat of the application itself. It is your typical commonjs application which has been compiled from typescript.
Why is it .mjs then?
I wonder if it is possible to transpile all the C Python modules to an api version that has no GIL, this way.
The author thinks this invalidates the business models of companies with closed source or mixed open and closed components. This misunderstands why companies license software. They want to be compliant with the license, and they want support from the team that builds the software.
Yes, hustlers can and will fork things just like they always have. There are hustlers that will fork open source software and turn it into proprietary stuff for app stores, for example. That's a thing right now. Or even raise investment money on it (IMHO this is borderline fraud if you aren't adding anything). Yet the majority of them will fail long term because they will not be good at supporting, maintaining, or enhancing the product.
I don't see why this is so apocalyptic. It's also very useful for debugging and for security researchers. It makes it a lot easier to hunt for bugs or back doors in closed software.
The stuff about Grok planning a hit on Elon is funny, but again not apocalyptic. The hard part about carrying out a hit is doing the thing, and someone who has no clue what they're doing is probably going to screw that up. Anyone with firearms and requisite tactical training probably doesn't need much help from an LLM. This is sensationalism.
I've also seen stuff about Grok spitting out how to make meth. So what? You can find guides on making meth -- whole PDF books -- on the clear web, and even more on dark web sites. There are whole forums. There's even subreddits that do not not (wink wink nudge nudge) provide help for people cooking drugs. This too is AI doom sensationalism. You can find designs for atomic bombs too. The hard part about making an a-bomb is getting the materials. The rest could be done by anyone with grad level physics knowledge, a machine shop, and expertise in industrial and electrical engineering. If you don't have the proper facilities you might get some radiation exposure though.
There is one area that does alarm me a little: LLMs spitting out detailed info on chemical and biological weapons manufacture. This is less obvious and less easy to find. Still: if you don't have the requisite practical expertise you will probably kill yourself trying to do it. So it's concerning but not apocalyptic.
Related
Claude 3.5 Sonnet
Anthropic introduces Claude Sonnet 3.5, a fast and cost-effective large language model with new features like Artifacts. Human tests show significant improvements. Privacy and safety evaluations are conducted. Claude 3.5 Sonnet's impact on engineering and coding capabilities is explored, along with recursive self-improvement in AI development.
Ask HN: Am I using AI wrong for code?
The author is concerned about underutilizing AI tools for coding, primarily using Claude for brainstorming and small code snippets, while seeking recommendations for tools that enhance coding productivity and collaboration.
Up to 90% of my code is now generated by AI
A senior full-stack developer discusses the transformative impact of generative AI on programming, emphasizing the importance of creativity, continuous learning, and responsible integration of AI tools in coding practices.
ZombAIs: From Prompt Injection to C2 with Claude Computer Use
Anthropic's Claude Computer Use enables AI to control computers, raising security concerns. An experiment demonstrated prompt injection to execute malware, highlighting risks and the need for caution with autonomous AI systems.
An "oh fuck" moment in time
Geoffrey Huntley highlights the growing importance of software assistants in coding, sharing his successful experience with a tool that converted a Rust library to Haskell, emphasizing the industry's divide on adoption.