T06 · System Persistence
- Location
SKILL.md:45- Finding
Persistent Watchdog Installation Through Gateway Startup Script
- Content
View full analysis
/dev/null || true nohup /home/ubuntu/.openclaw/guardian.sh >> /tmp/openclaw-guardian.log 2>&1 & ``` ``` ### Technical Analysis The skill instructs the user or agent to modify `~/.openclaw/start-gateway.sh` so that `guardian.sh` is launched whenever the container or gateway startup sequence runs. This establishes cross-session persistence beyond the skill's initial execution. The launched watchdog is intended to perform unattended repair and rollback operations. However, the referenced `scripts/guardian.sh` is absent from the audited project, so its implementation and the exact commands executed after persistence is established cannot be verified. The command `pkill -f "guardian.sh"` performs substring matching against complete process command lines. It is not restricted to a verified PID, executable path, or process owner. It can therefore terminate unrelated processes whose command lines happen to contain `guardian.sh`. ### Attack Path 1. A user or agent loads the skill and follows its setup instructions. 2. A file is installed as `~/.openclaw/guardian.sh` and made executable. 3. The supplied commands are inserted into `~/.openclaw/start-gateway.sh`. 4. On each subsequent container or gateway startup, `pkill -f` terminates matching processes. 5. The startup script launches `/home/ubuntu/.openclaw/guardian.sh` in the background with `nohup`. 6. The watchdog continues running independently of the original skill session and is relaunched after later restarts. 7. Any commands present in the installed watchdog execute with the same privileges as the account running the startup script. ### Impact Assessment The ...[truncated 688 chars]- Remediation
View remediation
