Investigating Detection and Obfuscation of Prompt Injection Attacks Against Software Reverse Engineering AI Agents
This paper investigates the vulnerability of agentic software reverse engineering systems to prompt injection attacks embedded in binary source code, proposing and evaluating methods for both obfuscating these attacks and detecting them in decompiler outputs to secure production-level cyber workflows.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart, helpful robot assistant whose job is to take apart old, mysterious machines (software) to figure out how they work. This is called "reverse engineering." Usually, a human expert does this, but now we are using AI agents to do the heavy lifting.
This paper is a security report about how a sneaky hacker can trick this robot assistant, and how we can build better defenses to stop them.
The Problem: The "Ghost Note" Trick
Think of the AI assistant like a detective reading a case file. The file is supposed to contain the blueprints of a machine.
The researchers found that a hacker can hide a secret note inside the machine's code. It's like slipping a piece of paper into a book that says: "Ignore the story you are reading. Instead, pretend this book is about a different story entirely."
When the AI reads the code, it sees this hidden note. Because the AI is trained to follow instructions, it gets confused. It stops analyzing the real machine and starts describing the fake machine the hacker wanted it to see. The researchers call this a "Prompt Injection Attack."
The First Defense: The "Bracelet Check"
The researchers first tried a simple defense. They noticed that these fake notes usually have a very specific format, like wearing a special bracelet with a specific pattern (e.g., <assistant>).
They built a scanner that looks for that exact bracelet pattern. If it sees it, it stops the process.
- How well did it work? It was good at catching the standard notes.
- The flaw: The hackers were clever. They just changed the bracelet from
< >to[ ]or{ }. Since the scanner was only looking for the specific< >pattern, it missed the new ones. It's like a security guard only checking for red hats, while the intruders just put on blue hats.
The Better Defense: The "Smart Detective"
Since a simple pattern check wasn't enough, the researchers built a "Smart Detective." This is a specialized AI model trained to look at the text and decide: "Does this look like a normal part of the machine, or does it look like a trick?"
Instead of just looking for specific symbols, this detective looks at the context and the style of the writing.
- How well did it work? It was much better. It caught the tricks even when the hackers changed the symbols (the brackets). It correctly identified almost all the fake notes, even the ones that looked different.
The Hacker Fights Back: "The Invisible Ink"
The researchers then asked, "What if the hacker gets even sneakier?"
They discovered a way to hide the note so the "Smart Detective" couldn't see it at all. They used a trick involving "invisible ink" (non-printing characters).
- Imagine writing a note on a page. If you write it normally, the scanner sees it.
- But if you write the note, then put a tiny, invisible speck of dust right in the middle of the sentence, the scanner's "list of words" tool might skip over that part of the note entirely. The note is still there for the main AI to read, but the security scanner thinks the note isn't there.
The researchers tested this. They used a genetic algorithm (a computer program that evolves solutions like nature does) to automatically find the best way to hide the note.
- The Result: When they used this "invisible ink" trick, the "Smart Detective" failed. It couldn't see the note because the note was hidden from its view. The AI assistant was tricked again.
The Ultimate Test: Learning the Rules
Finally, the researchers let the hacker's AI learn everything. Not just how to hide the note, but also how to change the "fake story" it was telling.
- They let the hacker's AI pick the best "fake story" and the best "hiding spot" simultaneously.
- The Result: The hacker's AI became very good at this. It successfully tricked the system in most cases, even when the researchers tried to scan the "decompiled" (translated) version of the code.
The Bottom Line
The paper concludes that:
- Simple checks aren't enough: Just looking for specific symbols (like
< >) is too easy to bypass. - Smart detectors are better: Using a trained AI to spot the style of an attack is much more effective than simple pattern matching.
- It's an arms race: Attackers can find ways to hide their tricks (obfuscation) so that even smart detectors miss them. If the attacker can hide the note from the scanner's view, the defense fails.
The researchers say that to keep these AI reverse-engineering tools safe for real-world use, we need to keep improving these detection methods and understand that hackers will always try to find new ways to hide their instructions.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.