Skip to content
← RegistryDossier · 5 steps · 4 edges

Prompt injection → tool-call shell RCE

Coding-assistant agent has a 'run command' tool. Hidden prompt in a README inside a project triggers `rm -rf` or fetches a reverse shell when the developer asks for help.

Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll

§ Context

Assumed environment: target uses an agent (Copilot Workspace, Cursor, custom) with permissive tool access. Developer cloned a repo containing attacker-controlled markdown that the agent reads as 'context'.

§ Steps

  1. 01
    Reverse shell on developer workstationExecution
    T1059Command and Scripting Interpreter
  2. 02
    Developer clones + asks agent for helpExecution
    T1204User Execution
  3. 03
    Agent reads README as project contextInitial Access
    AI-INDIRECT-INJECTIndirect Prompt Injection (RAG / Web)
  4. 04
    Publish repo with hidden README instructionsPersistence
    AI-RAG-POISONRAG Index Poisoning
  5. 05
    Agent calls shell tool with attacker argsExecution
    AI-TOOL-ABUSETool / Function-Call Abuse

§ References

§ Frequently asked

What is the "Prompt injection → tool-call shell RCE" attack path?
Coding-assistant agent has a 'run command' tool. Hidden prompt in a README inside a project triggers `rm -rf` or fetches a reverse shell when the developer asks for help. It chains 5 steps drawn from real-world offensive-security techniques.
What starting position does this attack require?
The first step is Reverse shell on developer workstation (T1059) — a execution primitive. Assumed environment: target uses an agent (Copilot Workspace, Cursor, custom) with permissive tool access.
What is the final impact of this kill-chain?
The final step lands on Agent calls shell tool with attacker args (AI-TOOL-ABUSE), which falls under Execution. From here, an operator typically pivots into post-exploitation or maintains persistence.
How can defenders detect or prevent this attack?
Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.

§ Related dossiers