跪拜 Guibai
← All articles
Rust

AI Generated 2 Million Lines of Rust to Clone a Closed-Source Binary Analyzer, and the Clone Runs Inside the Original Host

By 可夫小子 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Client-side protection schemes that rely on binary compilation, obfuscation, or commercial packers are losing their edge. Teams with sensitive local algorithms or licensing logic should treat server-side migration or hardware-based trusted execution as a priority, not an option.

Summary

On November 28, MiniMax reported an internal evaluation where their frontier model autonomously reverse engineered a known closed-source binary analysis software. The model dispatched 2,000 sub-agent sessions, generated roughly 2 million lines of Rust experimental code, and accumulated 10,000 automated test cases. The decisive validation: the reconstructed Rust core was compiled into a shared library, dropped into the original software's runtime directory, and the host program launched and executed the decompilation flow with its original frontend intact.

The method combines static and dynamic analysis, using Ghidra and GDB, then splits the large task into modules and employs differential testing to compare outputs against the original. Against a test set of 100 deliberately hardened virtualization and obfuscation samples, the model's single-pass success rate reached 70%, rising to 94% with 8 rounds of feedback-driven exploration. For samples protected with VMProtect 3.x and Themida, logic restoration exceeded 90% without targeted prompts.

The report itself is careful about limits: the numbers come from an internal model and a self-reported test set, with no independent replication. Performance degrades under multi-layer virtualization and heavy anti-debugging, and context-window overflow can cause loops. The generated code is experimental, not production-grade, and the whole effort depends on custom scaffolding. MiniMax says it destroyed all generated code and will restrict end-to-end cloning in future public releases.

Takeaways
— MiniMax's internal model orchestrated 2,000 sub-agent sessions to generate about 2 million lines of Rust code and 10,000 automated test cases in an isolated environment.
— The reconstructed Rust core was compiled into a shared library and swapped into the original closed-source software's runtime directory; the host program still started, loaded binaries, and ran the decompilation pipeline correctly.
— The pipeline used Ghidra, GDB, differential testing, and multi-agent orchestration to split the task and verify each module against the original program.
— On a 100-sample test set of hard virtualization and obfuscation cases, single-pass restoration reached 70%, and with 8 rounds of feedback-driven exploration, 94% combined restoration was achieved.
— For samples protected with VMProtect 3.x and Themida, the combined logic restoration rate exceeded 90% even without targeted human prompts.
— MiniMax stated that no independent third-party replication exists yet, the test used a non-public internal model, and all generated code was physically destroyed after evaluation.
— The report recommends moving high-value logic to server-side or hardware-based trusted execution environments as client-side hardening becomes less reliable.
Conclusions

The ability to swap reconstructed code into the original host with the frontend intact shows reverse engineering has moved from understanding to reproduction, a step change in capability.

The 94% restoration rate on hardened samples is impressive but masks gaps: the experiment relied on an internal model, custom scaffolding, and a controlled test set, so it is not yet a realistic threat to all software.

The reliance on differential testing and orchestrated agents suggests future AI-driven reverse engineering will be limited by context window and debugging skills, not by the complexity of the binary itself.

The security recommendation to move high-value logic to the server side is a direct consequence: client-side protection is no longer a reliable boundary.

Concepts & terms
Differential testing
A technique where two implementations of the same functionality are fed identical inputs and their outputs are compared to find discrepancies. In this evaluation, MiniMax used it to verify that reconstructed Rust modules behaved identically to the original binary.
Control flow flattening
An obfuscation method that replaces straightforward sequential control flow with a state-machine-like structure, making the program's logic much harder to follow and analyze.
Virtual machine protection (VMProtect)
A commercial tool that converts machine code into a custom bytecode executed by an embedded virtual machine, adding a layer of obscurity that hinders static and dynamic reverse engineering.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗