T06 · System Persistence
- Location
setup.sh:49- Finding
Persistent Command Execution Through a Recurring OpenClaw Cron Job
- Content
View full analysis
/dev/null | grep -q "gateway-auto-fix"; then openclaw cron add \ --name "gateway-auto-fix" \ --every "1m" \ --message "Run: $SCRIPT_PATH" \ --no-deliver \ --description "Auto-fix gateway if RPC probe fails" echo "✅ OpenClaw cron job added (every 1 minute)" ``` Equivalent persistent scheduling instructions also appear in `SKILL.md:43-48` and `SKILL.md:139-144`. ### Technical Analysis The setup script registers an OpenClaw cron job that instructs the agent to execute a local shell script every minute. The job persists beyond the installation process and continues running across subsequent sessions. Although the scheduled behavior is disclosed and supports the skill's stated monitoring purpose, it establishes a persistent execution point. The cron entry refers to a mutable file under the user's workspace instead of an immutable or integrity-verified artifact. If that script is subsequently modified, replaced, or made writable by another principal, the cron job will repeatedly execute the replacement content. The setup script also does not verify the resulting file's owner, permissions, or cryptographic integrity before registering the job. ### Attack Path 1. A user runs `setup.sh` or follows the documented manual installation procedure. 2. The installer writes an executable script to `~/.openclaw-it/workspace/openclaw-auto-fix.sh`. 3. The installer registers `gateway-auto-fix` as a recurring OpenClaw cron job. 4. OpenClaw processes the message `Run:- Remediation
View remediation
