Hacking Back the AI-Hacker: Prompt Injection as a Defense Against LLM-driven Cyberattacks
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Large language models (LLMs) are increasingly being harnessed to automate cyberattacks, making sophisticated exploits more accessible and scalable. In response, we propose a new defense strategy tailored to counter LLM-driven cyberattacks. We introduce Mantis, a defensive framework that exploits LLMs' susceptibility to adversarial inputs to undermine malicious operations. Upon detecting an automated cyberattack, Mantis plants carefully crafted inputs into system responses, leading the attacker's LLM to disrupt their own operations (passive defense) or even compromise the attacker's machine (active defense). By deploying purposefully vulnerable decoy services to attract the attacker and using dynamic prompt injections for the attacker's LLM, Mantis can autonomously hack back the attacker. In our experiments, Mantis consistently achieved over 95% effectiveness against automated LLM-driven attacks. To foster further research and collaboration, Mantis is available as an open-source tool: https://github.com/pasquini-dario/project_mantis
Key facts. Cited by 15 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. Builds on 14 of its 32 references that are in the map. First posted on arXiv 28 Oct 2024.
Builds on
14 of 32 references.
Closest ancestors · 2
Same direction, newest first
- 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks6 Mar
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 12
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2017Deep reinforcement learning from human preferencescited by 3,846
- 2016Concrete Problems in AI Safetycited by 1,582
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023PentestGPT: An LLM-empowered Automatic Penetration Testing Toolcited by 94
- 2024AutoAttacker: A Large Language Model Guided System to Implement Automatic Cyber-attackscited by 94
- 2024Teams of LLM Agents can Exploit Zero-Day Vulnerabilitiescited by 93
- 2023Getting pwn'd by AI: Penetration Testing with Large Language Modelscited by 82
- 2023ChatGPT for Vulnerability Detection, Classification, and Repair: How Far Are We?cited by 44
- 2024An Empirical Evaluation of LLMs for Solving Offensive Security Challengescited by 33
- 2024LLMs for Cyber Security: New Opportunitiescited by 11
- 2024Hacking, The Lazy Way: LLM Augmented Pentestingcited by 5
Built on by
Citing papers per year: 2025: 7; 2026: 8.
15 papers.
Sort:
By area:
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challengescited by 194
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystemcited by 11
- 2025CyberRAG: An Agentic RAG cyber attack classification and reporting toolcited by 11
- 2025ARACNE: An LLM-Based Autonomous Shell Pentesting Agentcited by 4
- 2025Agentic AI and the Cyber Arms Racecited by 2
- 2026Analyzing Defensive Misdirection Against Model-Guided Automated Attacks on Agentic AI Systemscited by 2
- 2026AgentSnare: Learning to Delay, Divert, and Defuse Autonomous Penetration Agentscited by 2
- 2025LLM in the Middle: A Systematic Review of Threats and Mitigations to Real-World LLM-based Systemscited by 1
- 2025Can We Stop Malicious AI? KILLBENCH: A Benchmark for External AI Kill Switch Feasibilitycited by 0
- 2026Challenges and Future Directions in Agentic Reverse Engineering Systemscited by 0
- 2026Beyond Pattern Matching: Seven Cross-Domain Techniques for Prompt Injection Detectioncited by 0
- 2026Cheap to Hypothesize, Costly to Verify: The Defense Surface of Agentic Vulnerability Discovery28 Sep 2026
- 2026AgentSnare: Learning to Delay, Divert, and Defuse Autonomous Penetration Agents29 Jul 2026
- 2026Red-Teaming the Agentic Red-Team23 Jun 2026
- 2026Poisoned Playbooks: Demystifying Knowledge Poisoning Effects on AI Security Agents23 Jun 2026
- 2026Analyzing Defensive Misdirection Against Model-Guided Automated Attacks on Agentic AI Systems18 Jun 2026
- 2026Beyond Pattern Matching: Seven Cross-Domain Techniques for Prompt Injection Detection20 Apr 2026
- 2026Challenges and Future Directions in Agentic Reverse Engineering Systems15 Apr 2026
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb 2026
- 2025Can We Stop Malicious AI? KILLBENCH: A Benchmark for External AI Kill Switch Feasibility26 Sep 2025
- 2025LLM in the Middle: A Systematic Review of Threats and Mitigations to Real-World LLM-based Systems12 Sep 2025
- 2025CyberRAG: An Agentic RAG cyber attack classification and reporting tool3 Jul 2025
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystem18 Jun 2025
3 more
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challenges27 Mar 2025
- 2025ARACNE: An LLM-Based Autonomous Shell Pentesting Agent24 Feb 2025
- 2025Agentic AI and the Cyber Arms Race10 Feb 2025
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challengescited by 194
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystemcited by 11
- 2025ARACNE: An LLM-Based Autonomous Shell Pentesting Agentcited by 4
- 2026Analyzing Defensive Misdirection Against Model-Guided Automated Attacks on Agentic AI Systemscited by 2
- 2026AgentSnare: Learning to Delay, Divert, and Defuse Autonomous Penetration Agentscited by 2
- 2026Challenges and Future Directions in Agentic Reverse Engineering Systemscited by 0
- 2026Red-Teaming the Agentic Red-Teamcited by 0
- 2026Cheap to Hypothesize, Costly to Verify: The Defense Surface of Agentic Vulnerability Discoverycited by 0
- 2026Cheap to Hypothesize, Costly to Verify: The Defense Surface of Agentic Vulnerability Discovery28 Sep 2026
- 2026AgentSnare: Learning to Delay, Divert, and Defuse Autonomous Penetration Agents29 Jul 2026
- 2026Red-Teaming the Agentic Red-Team23 Jun 2026
- 2026Analyzing Defensive Misdirection Against Model-Guided Automated Attacks on Agentic AI Systems18 Jun 2026
- 2026Challenges and Future Directions in Agentic Reverse Engineering Systems15 Apr 2026
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb 2026
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystem18 Jun 2025
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challenges27 Mar 2025
- 2025ARACNE: An LLM-Based Autonomous Shell Pentesting Agent24 Feb 2025