mlsanityData to 7 Oct 2026

Defense Against Prompt Injection Attack by Leveraging Attack Techniques

arXiv 2411.00459 ↗First posted 1 Nov 2024cs.CRcited by 31

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

With the advancement of technology, large language models (LLMs) have achieved remarkable performance across various natural language processing (NLP) tasks, powering LLM-integrated applications like Microsoft Copilot. However, as LLMs continue to evolve, new vulnerabilities, especially prompt injection attacks arise. These attacks trick LLMs into deviating from the original input instructions and executing the attacker's instructions injected in data content, such as retrieved results. Recent attack methods leverage LLMs' instruction-following abilities and their inabilities to distinguish instructions injected in the data content, and achieve a high attack success rate (ASR). When comparing the attack and defense methods, we interestingly find that they share similar design goals, of inducing the model to ignore unwanted instructions and instead to execute wanted instructions. Therefore, we raise an intuitive question: Could these attack techniques be utilized for defensive purposes? In this paper, we invert the intention of prompt injection methods to develop novel defense methods based on previous training-free attack methods, by repeating the attack process but with the original input instruction rather than the injected instruction. Our comprehensive experiments demonstrate that our defense techniques outperform existing training-free defense approaches, achieving state-of-the-art results.

Key facts. Cited by 31 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. First posted on arXiv 1 Nov 2024.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 13; 2026: 18.

31 papers.

Sort:

By area:

  1. 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
  2. 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 110
  3. 2025Safety in Large Reasoning Models: A Surveycited by 58
  4. 2026Zombie Agents: Persistent Control of Self-Evolving LLM Agents via Self-Reinforcing Injectionscited by 44
  5. 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injectioncited by 39
  6. 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMscited by 34
  7. 2026SkillJect: Effectively Automating Skill-Based Prompt Injection for Skill-Enabled Agentscited by 20
  8. 2025To Protect the LLM Agent Against the Prompt Injection Attack with Polymorphic Promptcited by 14
  9. 2025TraceAegis: Securing LLM-Based Agents via Hierarchical and Behavioral Anomaly Detectioncited by 11
  10. 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Managementcited by 10
  11. 2026Defense Against Indirect Prompt Injection via Tool Result Parsingcited by 8
  12. 2026The Promptware Kill Chain: How Prompt Injections Gradually Evolved Into a Multistep Malware Delivery Mechanismcited by 7
19 more
  1. 2025JavelinGuard: Low-Cost Transformer Architectures for LLM Securitycited by 4
  2. 2025ContextLeak: Auditing Leakage in Private In-Context Learning Methodscited by 4
  3. 2026Visual Inception: Compromising Long-term Planning in Agentic Recommenders via Multimodal Memory Poisoningcited by 4
  4. 2026SafeReview: Defending LLM-based Review Systems Against Adversarial Hidden Promptscited by 4
  5. 2026Turning Bias into Bugs: Bandit-Guided Style Manipulation Attacks on LLM Judgescited by 3
  6. 2025QueryIPI: Query-agnostic Indirect Prompt Injection on Coding Agentscited by 2
  7. 2025EAGER: Edge-Aligned LLM Defense for Robust, Efficient, and Accurate Cybersecurity Question Answeringcited by 2
  8. 2026LLM-enabled Applications Require System-Level Threat Monitoringcited by 2
  9. 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigationcited by 2
  10. 2026Large Language Models for Agentic NetOps and AIOps: Architectures, Evaluation, and Safetycited by 2
  11. 2025OET: Optimization-based prompt injection Evaluation Toolkitcited by 1
  12. 2026Are GUI Agents Focused Enough? Automated Distraction via Semantic-level UI Element Injectioncited by 1
  13. 2026Needle-in-RAG: Prompt-Conditioned Character-Level Traceback of Poisoned Spans in Retrieved Evidencecited by 1
  14. 2026AutoRAS: Learning Robust Agentic Systems with Primitive Representationscited by 1
  15. 2025From Craft to Constitution: A Governance-First Paradigm for Principled Agent Engineeringcited by 0
  16. 2026ReIn: Conversational Error Recovery with Reasoning Inceptioncited by 0
  17. 2026ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliancecited by 0
  18. 2026Data Leakage Prevention in Agentic Applications via Preemptive Hardeningcited by 0
  19. 2026PASTABench: Proactive Assessment of Sequential Trajectories for Agent Safetycited by 0