2026-11-18 · Can I Reverse Engineer It?

Can AI reverse engineer code? What works, what doesn't, and how to check

Abstract AI chip scanning stacked code blocks with beams of light

Can AI reverse engineer code? Partly. It is good at explaining and renaming code you can already read, it is improving at turning machine code back into source, and it still makes mistakes that a person has to catch. This article separates those cases and points to sources for each.

Last reviewed: 2026-11-18. This field changes quickly. Research results and tool lists below were checked on this date.

First, define "reverse engineer"

The answer depends on what you start with.

  1. Readable but messy code, such as minified or obfuscated JavaScript. The logic is present. Names and layout are not.
  2. Compiled code, such as a native binary. The original names, comments and structure are gone, and a decompiler has to guess them.
  3. Behaviour only, such as a web app or API you can observe but not read. You infer how it works from traffic and responses.

AI helps in each case, in different ways.

Case 1: messy code you can read

This is where language models work best today. Given a chunk of minified JavaScript, a model can propose meaningful variable names, describe what a function does and point out where a feature lives. The model is reading text, which is what it is built for.

You can see this in public projects. One GitHub repository on Claude Code's published bundle describes a process of unminifying the file, searching for anchor strings, extracting the relevant code and renaming identifiers, and says it packaged that process as a Claude Code skill so an agent can repeat it. Our article on what is publicly known about Claude Code covers that case in more detail.

The weak point is certainty. A model can describe a function confidently and be wrong about an edge case. Treat its explanation as a lead to check against the code.

Case 2: compiled binaries

Turning a binary back into source is a harder problem, and it has an active research literature.

The LLM4Decompile paper trains language models to decompile binaries. Its authors report that their best models outperform GPT-4o and Ghidra on two benchmarks (HumanEval and ExeBench) by over 100% in re-executability rate, meaning the recovered code, when recompiled, produces the correct behaviour. Those are benchmark results on specific test sets, not a promise for arbitrary real-world software.

A more recent preprint on neural decompilation says that a substantial gap remains between best-sample performance and practical single-output accuracy, particularly under code obfuscation. In plain terms: the right answer is often among the model's candidates, and picking it reliably is still unsolved.

Practical tools are moving toward combining the two approaches. Instead of replacing the decompiler, the model sits next to it. GhidraMCP, for example, is a server that exposes Ghidra's functions to AI assistants through the Model Context Protocol. The assistant asks Ghidra for a function's decompiled code, cross-references or strings, then reasons over the output. The classic tool does the structural work and the model does the explaining. See our overview of reverse engineering tools for what each tool does.

Case 3: behaviour only

If you can only observe a product from outside, AI helps you organise what you see. You can paste in a captured request and response and ask for a likely schema, or ask for a list of questions to test next. It cannot see inside the server. Anything it says about backend logic is inference.

That is how we treat evidence on this site. Our teardowns separate what a source states, what we observed and what we inferred, and we verify quotes against fetched pages. Read the teardown of this site to see the format.

A related result: AI finding vulnerabilities

DARPA's AI Cyber Challenge ended in August 2025 with Team Atlanta as the winner. According to Dark Reading, the competing systems found 54 synthetic vulnerabilities in the final challenges and patched 43, and teams also found 18 real vulnerabilities that were reported to open-source maintainers. This worked on source code with known build setups, which makes it different from decompiling an unknown binary. It does show that automated systems can analyse large codebases for specific bug classes.

Where AI fails

  • Invented detail. A model may name a function after what it expects, not what the code does.
  • Obfuscation. Control-flow flattening, packers and anti-analysis tricks make both humans and models slower. The preprint above names obfuscation specifically as a weak spot.
  • Long context. Large programs do not fit in one prompt. Results depend on how well the surrounding tool selects what to show.
  • False confidence. A tidy, readable output looks more trustworthy than it is.

How to check AI output

  1. Run it. If the model reconstructs a function, compile or execute it against known inputs and compare results with the original.
  2. Cross-check with a second source. Match claims against disassembly, strings, call graphs or captured traffic.
  3. Keep notes on evidence. Record where each claim came from, so a later reader can tell fact from guess.
  4. Check scope. Make sure you are allowed to analyse the target before you start.

Legal and ethical limits

AI does not change the rules. Whether you may analyse and reuse a piece of software depends on its licence, the contract you accepted and the law where you live, as our guide to the legality of reverse engineering explains. It is general information, not legal advice. Using a model also means sending code or data to a provider, so check that you are allowed to share the material you paste in.

Does AI make cloning easier?

It shortens some steps, mostly reading and writing code. It does not remove the hard parts of a product, such as data, scale, integrations and the model behind an AI feature. To estimate that for a specific idea, score it with the clone difficulty tool or look up a similar product in the ChatGPT teardown.

Bottom line

AI is a strong assistant for reading and explaining code, a growing helper for decompilation, and a weak substitute for verification. Use it to speed up work you can check.

#ai#reverse engineering#decompilation#llm#ghidra