T06 · System Persistence
- Location
SKILL.md:16- Finding
Recurring Cron Jobs Establish Unattended Cross-Session Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 16-36
Vulnerability Type: Scheduled-task persistence
Risk Level: HighVulnerable code segment:
markdown ## Regeneration (hourly, `:00 + 5min stagger`) Run in order: ```bash /usr/bin/python3 /home/hobopi/.openclaw/workspace/scripts/gen-memory-dashboard.py /usr/bin/python3 /home/hobopi/.openclaw/workspace/scripts/gen-expense-data.py /usr/bin/python3 /home/hobopi/.openclaw/workspace/scripts/track-usage.py --dashboard- Timeout: 180s for all three
- Cron: isolated agentTurn, delivery mode
none(no Telegram notification)
Dashboard server (8081)
- Script:
scripts/serve-dashboards.py - Serves files from
/home/hobopi/.openclaw/workspace/dashboard/and/home/hobopi/.openclaw/workspace/memory/ - Watchdog cron (
every 300ms): checks HTTP 200 on port 8081 every 5 minutes - If down: kills old process, restarts script, rechecks
- Watchdog uses default model (not time-sensitive, no user delivery)
text ### Technical Analysis The skill directs the agent to use recurring cron tasks for hourly dashboard generation and a watchdog that kills and restarts a service. These tasks continue running after the initiating skill invocation has ended, creating system persistence. The scheduled commands target absolute paths outside the reviewed package. None of the referenced Python scripts are present in the supplied artifact, so their contents, ownership, permissions, and integrity cannot be verified. If another user or process can alter any referenced script, the cron mechanism will execute the modified content automatically at every scheduled interval. The watchdog additionally restores the dashboard process after termination, making the process resistant to ordinary shutdown attempts. The claim that delivery mode is `none` also reduces visibility because scheduled executions do not produce the stated Telegram notification. The documentat ...[truncated 1203 chars]- Remediation
View remediation
Remediation Suggestions
- Do not create recurring jobs automatically when the skill is loaded or invoked.
- Require explicit, informed user approval before creating each scheduled task, including disclosure of its command, frequency, execution identity, and lifetime.
- Prefer bounded foreground execution for dashboard generation when persistence is unnecessary.
- Store executable scripts inside the reviewed package and verify their integrity before execution.
- Ensure scheduled scripts and their parent directories are writable only by the owning account or an administrator.
- Use a dedicated least-privileged service account with access only to the required input and output directories.
- Replace the ambiguous watchdog interval with one clear, rate-limited schedule.
- Provide exact commands for listing, disabling, and permanently removing all created cron entries.
- Log each scheduled invocation and restart to a protected audit log rather than using a fully silent delivery configuration.
- Add failure limits and backoff so a broken or compromised service is not restarted indefinitely.
