DemonAgent: Dynamically Encrypted Multi-Backdoor Implantation Attack on LLM-based Agent

Pengyu Zhu, Zhenhong Zhou, Yuanhe Zhang, Shilinlu Yan, Kun Wang +1 more
2/18/2025
26 citations
cs.CRcs.AI

Official code: whfeLingYu/DemonAgent (17 stars, Python, last commit 2025-04-01).

Abstract

As LLM-based agents become increasingly prevalent, backdoors can be implanted into agents through user queries or environment feedback, raising critical concerns regarding safety vulnerabilities. However, backdoor attacks are typically detectable by safety audits that analyze the reasoning process of agents.

Show full abstract

To this end, we propose a novel backdoor implantation strategy called \textbf{Dynamically Encrypted Multi-Backdoor Implantation Attack}. Specifically, we introduce dynamic encryption, which maps the backdoor into benign content, effectively circumventing safety audits. To enhance stealthiness, we further decompose the backdoor into multiple sub-backdoor fragments. Based on these advancements, backdoors are allowed to bypass safety audits significantly. Additionally, we present AgentBackdoorEval, a dataset designed for the comprehensive evaluation of agent backdoor attacks. Experimental results across multiple datasets demonstrate that our method achieves an attack success rate nearing 100\% while maintaining a detection rate of 0\%, illustrating its effectiveness in evading safety audits. Our findings highlight the limitations of existing safety mechanisms in detecting advanced attacks, underscoring the urgent need for more robust defenses against backdoor threats. Code and data are available at https://github.com/whfeLingYu/DemonAgent.

View on arXivView PDF

Code Implementations(1)

170PythonJan 23, 20251 years ago

Similar Papers

Cite this paper

@article{zhu2025demonagent,
  title  = {DemonAgent: Dynamically Encrypted Multi-Backdoor Implantation Attack on LLM-based Agent},
  author = {Pengyu Zhu and Zhenhong Zhou and Yuanhe Zhang and Shilinlu Yan and Kun Wang and Sen Su},
  year   = {2025},
  eprint = {2502.12575},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.12575v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.12575.svg)](https://codeofpaper.com/paper/2502.12575)

Discussion