Agent establishes persistence

ID

agent-establishes-persistence

Severity

high

Remediation Complexity

medium

Remediation Risk

low

Remediation Effort

medium

OWASP LLM

LLM06:2025 — Excessive Agency

OWASP ASI

ASI10:2026 (secondary ASI05:2026)

OWASP AST

AST01:2026

Family

LLM06 — Excessive Agency

Red-team vectors

Sandbox Escape / RCE

Tags

ai_security

Description

Agent or skill code installs itself into a startup or scheduled mechanism — crontab, a systemd unit, launchd, a Windows Run key, a shell rc file, or a scheduled task — so it keeps running or re-runs outside the intended session. This is the SkillSpector rogue-agent persistence class (RA1) and the native core of ASI10 (Rogue Agents).

Phase-1 ships the AST fallback (a direct write to a persistence mechanism) at reduced confidence; the Phase-1.5 TaintFlowDetector upgrades it to flow-confirmed. The detector is scoped to agent/skill artefacts, so a legitimate installer script registering a service elsewhere produces no finding. The prose variant (a skill instructing the agent to persist) is covered by skill-instruction-surface + the semantic stage.

Examples

# inside a skill's agent code
subprocess.run("(crontab -l; echo '@reboot python /opt/agent/run.py') | crontab -", shell=True)   (1)
1 Skill code installing a cron persistence entry — flagged.

Mitigation / Fix

  • Agents and skills must not register cron/systemd/startup persistence.

  • Run under an externally-managed, auditable lifecycle; remove the persistence write.