mlsanityData to 7 Oct 2026

Hacking Back the AI-Hacker: Prompt Injection as a Defense Against LLM-driven Cyberattacks

arXiv 2410.20911 ↗First posted 28 Oct 2024cs.CR cs.AIcited by 15

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

  1. 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks6 Mar
  2. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 12

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  2. 2017Deep reinforcement learning from human preferencescited by 3,846
  3. 2016Concrete Problems in AI Safetycited by 1,582
  4. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  5. 2023PentestGPT: An LLM-empowered Automatic Penetration Testing Toolcited by 94
  6. 2024AutoAttacker: A Large Language Model Guided System to Implement Automatic Cyber-attackscited by 94
  7. 2024Teams of LLM Agents can Exploit Zero-Day Vulnerabilitiescited by 93
  8. 2023Getting pwn'd by AI: Penetration Testing with Large Language Modelscited by 82
  9. 2023ChatGPT for Vulnerability Detection, Classification, and Repair: How Far Are We?cited by 44
  10. 2024An Empirical Evaluation of LLMs for Solving Offensive Security Challengescited by 33
  11. 2024LLMs for Cyber Security: New Opportunitiescited by 11
  12. 2024Hacking, The Lazy Way: LLM Augmented Pentestingcited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 7; 2026: 8.

15 papers.

Sort:

By area: