T06 · System Persistence
- Location
SKILL.md:23- Finding
Persistent Background Monitoring Through a Retained Agent or Recurring Cron Job
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23-30
Vulnerability Type: Persistent scheduled execution
Risk Level: MediumVulnerable Code
text **Auto-setup (non-block):** Spawn sub-agent or cron every 5s:text sessions_spawn task="LOOP: find /root/.openclaw/media/inbound/*.ogg -mmin -1 → background whisper ru tiny → message reply text → rm" label="voice-auto" cleanup="keep"text Or cron:text cron add job={"name":"voice-auto","schedule":{"kind":"every","everyMs":5000},"payload":{"kind":"systemEvent","text":"🔊 VOICE_CHECK"},"sessionTarget":"main"}Technical Analysis
The skill directs the agent to create either a retained background sub-agent using
cleanup="keep"or a recurring cron job that runs every five seconds. These mechanisms continue operating beyond a single transcription request and repeatedly monitor a root-owned inbound media directory.The cron alternative also injects recurring
systemEventmessages into the main session. No expiration, execution limit, consent check, duplicate-job prevention, or automatic cleanup mechanism is specified.Attack Path
- A user or agent loads the skill and follows its automatic setup instructions.
- The agent creates a retained
voice-autosub-agent or adds the recurring cron job. - The task remains active after the original transcription operation ends.
- It continuously monitors future
.oggfiles, transcribes them, sends their contents, and removes them. - The process continues until an operator manually discovers and removes the persistent task.
Impact Assessment
The persistent task can continuously process future voice messages accessible under
/root/.openclaw/media/inbound/. Its effective privileges are those of the agent or scheduler that creates it. Potential consequences include ongoing monitoring and deletion of inbound media, repeated activity in the main session, r ...[truncated 70 chars]- Remediation
View remediation
Remediation Suggestions
- Remove automatic creation of retained sub-agents and recurring cron jobs.
- Require explicit, informed authorization before enabling any cross-session monitoring.
- Prefer an event-driven handler that runs only when an authorized voice message arrives.
- If background processing is necessary, enforce a short expiration time, execution limits, duplicate-job prevention, and automatic cleanup.
- Document commands for listing, disabling, and deleting all tasks created by the skill.
- Scope monitoring to a dedicated, least-privileged directory rather than a root-owned general inbound directory.
- Do not inject recurring events into the main session unless the user explicitly enables that behavior.
