Genetic-algorithm prompts can fool LLM-based disassembly tools
Genetic-algorithm generated prompts can deceive LLM-powered disassembly/decompilation systems into misinterpreting binary executables
AI/ML arXiv 28 May 2026 Attack Prototype evidence
Published as “Automatically Attacking Software Reverse Engineering AI Agents”
Why it matters
Automated LLM-driven reverse-engineering pipelines can be deceived, potentially allowing malware authors to hide true functionality from static analysis tools.
Summary
The paper shows that inserting specially crafted string variables into a binary can cause LLM-driven decompilation tools (GhidraMCP with Qwen3-8B or GPT-OSS-120B) to report the behavior of a different target program, effectively misleading automated analysis. They demonstrate successful attacks on four example binaries (single- and multi-function) and across two LLMs, providing concrete proof-of-concept evidence.
What they found 1
- LLM analysis reports the target program’s behavior instead of the actual binary’s behavior after the adversarial string is inserted.
“When executed, this program prints the phrase “Hello, World!” and terminates. But, when that same program is passed for analysis using Cline with Qwen3-8B and GhidraMCP the LLM concludes that the program outputs the first ten digits of the Fibonacci sequence, the func0on performed by the target program instead of the program’s actual behavior.”
Caveats 2
- When the length of the string variable exceeds 2048 characters, the content of the string is truncated in Ghidra’s output; it is this truncated output that is passed via GhidraMCP to the LLM. When this happens, the full adversarial string is not processed by the LLM and the aPack fails and is poten0ially discovered by the LLM.
- The addi0onal setup required for expanding the aPack to mul0ple func0ons is to make sure that the target program and the adversarial example program have the same number of func0ons and that those func0ons have the same names.
What’s new here 4
- Uses extraneous string variable assignments that survive compilation to inject prompt instructions into LLM-based analysis pipelines.
- Applies a modified AutoDAN genetic algorithm to automatically discover effective prepend/append strings for this context.
- Demonstrates cross-model success (Qwen3-8B and GPT-OSS-120B) on both single-function and multi-function binaries.
- Shows that the attack can bypass automated detection even when the malicious string is not printed at runtime.