T06 · System Persistence
- Location
scripts/install.sh:144- Finding
Automatically Installed Persistent Cron Task with Excessive Execution Frequency
- Content
View full analysis
/dev/null | grep -v "memory-workflow" || true) > /tmp/cron_temp # 添加新的 cron 任务 echo "*/1 * * * * $SCRIPTS_DIR/daily-summary.sh >> $LOGS_DIR/daily-summary.log 2>&1" >> /tmp/cron_temp # 安装 cron 任务 crontab /tmp/cron_temp rm /tmp/cron_temp ``` ### Technical Analysis The installer automatically modifies the installing account's crontab and registers `daily-summary.sh` for execution every minute. This scheduled task survives the installation process and subsequent login sessions. Scheduled execution is related to the declared daily-summary functionality and is disclosed in `SKILL.md`. However, running the script every minute is broader than the minimum execution frequency normally required to create one daily note. The task is also installed automatically rather than through a separate, explicit scheduling opt-in. The installer removes all existing crontab lines containing the substring `memory-workflow`. This is not restricted to an exact entry managed by this package and could unintentionally delete unrelated entries that happen to contain the same text. The paths are hard-coded under `/root/.openclaw/workspace`, indicating that the task is expected to run in a privileged root environment. Any subsequent modification of the scheduled script or its sourced configuration would therefore be executed repeatedly with the privileges of the crontab owner. ### Attack Path 1. The Skill installer is run, potentially as root because all operational paths are under `/root`. 2. The installer rewrites the current account's crontab. 3. A persistent cron entry invokes `daily-summary.sh` every minute. 4. If the scheduled script, its template, or the sourced configuration later becomes writable by an untrusted party, that party can introduce commands i ...[truncated 610 chars]- Remediation
View remediation
