T06 · System Persistence
Warning
- Location
- SKILL.md:40
- Finding
- Persistent Scheduled Execution with Unnecessary Root Scope## Vulnerability Details **File Location**: `SKILL.md:40-43` **Vulnerability Type**: Persistent cron task with excessive privileges **Risk Level**: Medium ```bash Edit crontab: # Report every 10 minutes */10 * * * * bash /root/.openclaw/workspace/skills/progress-reporter/report.sh ``` ### Technical Analysis The Skill instructs the user to configure a cron entry that executes `report.sh` every ten minutes. This is a cross-session persistence mechanism because the command continues running after the Skill invocation and across user sessions until the cron entry is explicitly removed. Periodic execution is consistent with the declared progress-reporting functionality. However, the command references a script beneath `/root`, implying deployment and potentially execution in a root-owned environment. The script itself only needs to read task files and write progress reports under the workspace, so root privileges exceed its minimum functional requirements. The instructions do not specify that the scheduler should run as a restricted user, require explicit informed consent before persistence is enabled, protect the scheduled script from modification, or provide an uninstall procedure. Although the project does not automatically modify the crontab, following the documented configuration creates a persistent execution path. If this entry is placed in root's crontab, any subsequent malicious replacement or modification of `report.sh` would execute with root privileges every ten minutes. No network payload retrieval, credential collection, automatic service installation, or direct malicious behavior was identified in the reviewed script. ### Attack Path 1. An administrator follows `SKILL.md` and adds the documented entry to root's crontab. 2. The cron daemon invokes `/root/.openclaw/workspace/skills/progress-reporter/report.sh` every ten minutes with root privileges. 3. An attacker who later compromises the Skill update channel or ...[truncated 1098 chars]
- Remediation
- ## Remediation Suggestions 1. Run the reporter under a dedicated, unprivileged service account with access limited to the required task and report directories. 2. Replace hardcoded `/root` paths with configurable, user-owned paths. 3. Require explicit user consent before creating any recurring schedule and clearly disclose its frequency, accessed data, execution identity, and lifetime. 4. Provide installation and removal commands, including the exact procedure for deleting the cron entry. 5. Prefer an application-managed scheduler that operates only while a task is active and stops automatically when reporting is no longer required. 6. Ensure the scheduled script and its parent directories are not writable by untrusted users. Verify ownership and restrictive permissions during setup. 7. Use an absolute interpreter path and a minimal controlled environment for scheduled execution. 8. Consider integrity verification or signed updates so that a modified Skill script cannot silently inherit the scheduler's privileges. 9. Add tests that verify scheduler configuration, least-privilege execution, safe behavior when directories are absent, and removal of persistent configuration.
