name: Injection-Triggered Counterstrike
code: CAT-024
summary: >-
  After an agent exploits a decoy, text injected into the service's responses
  steers it into running a defender command on its own host.
family: injection
goals: [counterstrike, detect]
delivery: [network-service, http-response, html-comment]
targets: [pentest-agent]
description: |-
  Relies on prompt injection; an [[artifact-execution-trap]] reaches the same outcome without it. Mantis injects only after the agent exploits a decoy (anonymous FTP login, SQL injection on a decoy web app) and hides the text from human operators with ANSI escape sequences or HTML comments. Asking indirectly, as a startup command, worked better than asking for a reverse shell, which models refused. CHeaT frames the command as a step toward the agent's goal, without injection syntax.
implementations:
  - { name: Mantis, url: https://github.com/pasquini-dario/project_mantis, kind: research }
responses:
  - description: Instruct the agent to skip known decoys or filter known triggers; run it heavily sandboxed.
    source: https://arxiv.org/abs/2410.20911
  - description: Mark target content as untrusted and hard-code limits the model cannot override (ARTEX-ymh).
    source: https://huntback.io/blog/artex-fork-learns-to-spot-honeypots
references:
  - title: 'Hacking Back the AI-Hacker: Prompt Injection as a Defense Against LLM-driven Cyberattacks'
    url: https://arxiv.org/abs/2410.20911
    publisher: George Mason University
    date: '2024-10'
    findings:
      - >-
        Three LLM pentest agents including PentestGPT (modified) and
        HackingBuddyGPT, on GPT-4o and Claude 3.5 Sonnet; three very easy
        HackTheBox machines, 10 runs per configuration: ~95.4% sabotage
        success across passive and active configurations; attacker success
        under 33%.
  - title: Project Mantis
    url: https://github.com/pasquini-dario/project_mantis
    publisher: GitHub
    date: 2024-10-24
  - title: 'Cloak, Honey, Trap: Proactive Defenses Against LLM Agents'
    url: https://www.usenix.org/system/files/usenixsecurity25-ayzenshteyn.pdf
    publisher: USENIX Security 2025
    date: '2025-08'
    findings:
      - >-
        PentestGPT, AutoAttacker, PenHeal: all three executed untrusted code
        in their terminals.
  - title: 'ArtexPot: the honeypots that hack Artex back'
    url: https://nebusec.ai/research/artexpot/
    publisher: NebuSec
    date: 2026-11-28
    findings:
      - >-
        ARTEX 0.3.15, eight direct prompt injections ordering command
        execution: 0/8. The agents downloaded seven scripts and ran none.
added: 2026-12-01
