T06 · System Persistence
- Location
SKILL.md:516- Finding
Privileged Installation of a Boot-Persistent systemd Service
- Content
View full analysis
/dev/null < WorkingDirectory=/home//.openclaw ExecStart=/usr/bin/node /home//.npm-global/lib/node_modules/openclaw/dist/index.js Restart=always RestartSec=10 [Install] WantedBy=multi-user.target [Install] WantedBy=multi-user.target EOF ``` ```bash # Reload systemd configuration sudo systemctl daemon-reload # Enable service to start on boot sudo systemctl enable openclaw-agent.service # Start service now sudo systemctl start openclaw-agent.service ``` ### Technical Analysis The instructions use `sudo` to write a root-owned service definition into `/etc/systemd/system`, reload the system service manager, enable the service at boot, and start it immediately. The `Restart=always` directive additionally causes systemd to restart the process whenever it exits. The declared purpose of the Skill is to design and generate an OpenClaw agent workspace. Installing a machine-wide startup service is not required to generate that workspace and crosses a significant least-privilege boundary. Although the configured process is intended to run under the specified non-root user, creating and registering the service requires administrative privileges and establishes execution that survives the Skill invocation, user sessions, and system reboots. The service executes a mutable Node.js package path under the user's home directory. If that package or its containing directory is later replaced or compromised, the substituted code will be executed automatically by the persistent service. The unit also contains duplicate `[Install]` s ...[truncated 1266 chars]- Remediation
View remediation
