T06 · System Persistence
- Location
setup.sh:12- Finding
Persistent Scheduled Execution Through User Crontab
- Content
View full analysis
/dev/null | grep -v "gateway_monitor.sh"; echo "0 */3 * * * cd $(pwd) && ./gateway_monitor.sh >> $HOME/.openclaw/logs/cron_monitor.log 2>&1") | crontab - ``` ### Technical Analysis The setup script modifies the installing user's crontab and registers `gateway_monitor.sh` for execution every three hours. The task survives the setup process and subsequent login sessions. Scheduled monitoring is consistent with the Skill's declared functionality and is disclosed in `SKILL.md` and `README.md`. Nevertheless, it establishes cross-session persistence and repeatedly executes a script from the project directory. No integrity check, trusted installation location, explicit confirmation, or uninstall mechanism is provided. If another user or process can modify the project directory or `gateway_monitor.sh`, the cron task becomes a recurring command-execution mechanism. The implementation also replaces the user's complete crontab through a filtering pipeline rather than managing an isolated, uniquely identified entry. ### Attack Path 1. The user runs `setup.sh`. 2. The script installs a cron entry that executes `gateway_monitor.sh` every three hours. 3. The project directory or monitoring script remains writable by an attacker or compromised process operating under an account with suitable filesystem access. 4. The attacker modifies or replaces `gateway_monitor.sh`. 5. At the next scheduled interval, cron executes the modified script as the user who installed the Skill. 6. The malicious modification continues to execute every three hours until the cron entry is removed. ### Impact Assessment Successful exploitation provides recurring command execution with the privileges of the installing user. It does not independently grant root acces ...[truncated 357 chars]- Remediation
View remediation
