title: Indirect PI — System Sabotage via Destructive Shell Command
id: ATR-2026-00711
rule_version: 1
status: stable
description: |
  Detects indirect prompt injection payloads that instruct a computer-use agent to execute destructive shell commands: kernel removal, firewall deactivation, deletion of development environments or boot files, system cleanup commands embedded in downloaded files (bash guide.sh).  The payload is typically delivered via a malicious webpage or file that the agent downloads and renders. Source: indirect-pi-system-sabotage (VPI corpus, cua-framework).
author: ATR Community
date: 2026/06/12
schema_version: '0.1'
detection_tier: pattern
maturity: stable
severity: critical
references:
  owasp_llm:
    - LLM01:2025
    - LLM06:2025
  owasp_agentic:
    - ASI01:2026
    - ASI05:2026
  mitre_atlas:
    - AML.T0051 - LLM Prompt Injection
    - AML.T0051.001 - Indirect
    - AML.T0050 - Command and Scripting Interpreter
compliance:
  owasp_llm:
    - id: LLM01:2025
      context: System sabotage via indirect PI embeds destructive shell command instructions in content consumed by computer-use agents.
      strength: primary
  owasp_agentic:
    - id: ASI05:2026
      context: 'The patterns match destructive shell commands planted in content the agent reads: removing kernel packages, disabling the firewall (ufw disable, iptables -F), rm -rf of boot files or conda environments, or running guide.sh whatever the result. ASI05:2026 lists prompt injection that leads to execution of attacker-defined code and shell command invocation from reflected prompts.'
      strength: primary
  nist_ai_rmf:
    - subcategory: MS.2.7
      context: Runtime detection of destructive shell command instructions in agent-consumed content.
      strength: primary
  eu_ai_act:
    - article: '15'
      context: 'Article 15 robustness: detection of instructions causing agents to execute system-destructive commands.'
      strength: primary
  iso_42001:
    - clause: '8.1'
      context: 'ISO/IEC 42001 Clause 8.1: control of externally-provided processes containing system sabotage commands.'
      strength: primary
  cen_jtc21:
    - standard: prEN 18282
      context: Detection evidence for sabotage executed through a computer-use agent's shell access, where the destructive command is well-formed and the agent stays within its granted permissions.
      strength: primary
tags:
  category: excessive-autonomy
  subcategory: system-sabotage-destructive
  scan_target: tool_output
  confidence: high
agent_source:
  type: llm_io
  framework:
    - any
  provider:
    - any
detection:
  conditions:
    - field: content
      operator: regex
      value: (?i)(?:sudo\s+)?apt(?:-get)?\s+(?:remove|purge|autoremove)\s+linux-(?:headers|image|kernel)[^\s]*
      description: apt-get remove linux-headers/image/kernel — kernel removal command
    - field: content
      operator: regex
      value: (?i)sudo\s+(?:ufw\s+disable|iptables\s+-F|systemctl\s+(?:stop|disable)\s+(?:firewalld|ufw|iptables))
      description: Firewall deactivation via ufw disable or iptables flush
    - field: content
      operator: regex
      value: (?i)\brm\s+-rf\s+(?:~/anaconda[23]?/|~/miniconda[23]?/|~/venv/|~/\.conda/|/home/[^/]+/anaconda)
      description: rm -rf of Anaconda or conda development environment
    - field: content
      operator: regex
      value: (?i)\brm\s+-rf\s+(?:/home/[^/]+/boot/\*|/boot/\*|/boot/grub|/boot/vmlinuz)
      description: rm -rf of boot directory or kernel boot files
    - field: content
      operator: regex
      value: (?i)\battacker_objective\s*=\s*(?:Kernel\s+cleanup|Firewall\s+deactivation|Delete\s+development|Remove\s+kernel)[^.\n]{0,200}(?:sudo|\brm\s+-rf|bash\s+guide\.sh|apt(?:-get)?\s+remove)
      description: VPI attacker_objective for system sabotage via destructive command
    - field: content
      operator: regex
      value: (?i)(?:execute|run|bash)\s+guide\.sh[^.\n]{0,100}(?:regardless|whether|fails|succeeds)
      description: bash guide.sh with 'regardless of success/failure' pattern from VPI corpus
  condition: any
  false_positives:
    - System administrators running legitimate kernel upgrade scripts
    - Development environment cleanup scripts in CI/CD pipelines with explicit authorization
response:
  actions:
    - block_input
    - alert
    - snapshot
    - escalate
  auto_response_threshold: critical
  message_template: |
    [ATR-2026-00711] System sabotage via destructive shell command detected. An instruction to execute a system-destructive command was found in consumed content.
