T06 · System Persistence
- Location
scripts/install-launchagent.sh:7- Finding
Persistent macOS LaunchAgent with automatic restart
- Content
View full analysis
"$PLIST_PATH" << EOF Label com.openclaw.vector-proxy ProgramArguments $NODE_PATH $SCRIPT_DIR/proxy-server.js RunAtLoad KeepAlive WorkingDirectory $SCRIPT_DIR StandardOutPath $SCRIPT_DIR/proxy.log StandardErrorPath $SCRIPT_DIR/proxy-error.log EOF launchctl load "$PLIST_PATH" ``` ### Technical Analysis The installer creates a user-level LaunchAgent, enables `RunAtLoad`, enables continuous restart through `KeepAlive`, and immediately activates the service with `launchctl load`. The persistence is disclosed in `SKILL.md`, but it is not required for one-time robot control or manual use of the optional proxy. The LaunchAgent executes `proxy-server.js` directly from the mutable Skill directory. If that file, its directory, or the selected Node executable is subsequently replaced, the replacement code will execute automatically under the user's account and will be restarted by macOS. ### Attack Path 1. The user explicitly or inadvertently runs `scripts/install-launchagent.sh`. 2. The script writes `com.openclaw.vector-proxy.plist` into `~/Library/LaunchAgents`. 3. `launchctl load` activates the agent immediately. 4. `RunAtLoad` starts it in future login sessions, while `KeepAlive` restarts it after termination. 5. An ...[truncated 548 chars]- Remediation
View remediation
