T06 · System Persistence
- Location
- SKILL.md:21
- Finding
- Persistent System-Wide Services for Dashboard and Network Exposure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 21–31 and 123–154 **Vulnerability Type**: System-wide service persistence **Risk Level**: Critical ### Vulnerable Code ```json { "id": "service", "kind": "systemd", "label": "Create Mission Control systemd service", "path": "/etc/systemd/system/mission-control.service" }, { "id": "tailscale", "kind": "systemd", "label": "Create Tailscale proxy service", "path": "/etc/systemd/system/tailscale-serve.service" } ``` ```ini [Unit] Description=Mission Control Dashboard After=network.target [Service] Type=simple User=broedkrummen WorkingDirectory=/home/broedkrummen/.openclaw/workspace-mission-control ExecStart=/usr/bin/npm run dev Restart=always [Install] WantedBy=multi-user.target ``` ```ini [Unit] Description=Tailscale Serve for Mission Control After=network.target tailscaled.service [Service] Type=simple User=root ExecStart=/usr/bin/sudo /usr/bin/tailscale serve 3000 Restart=always [Install] WantedBy=multi-user.target ``` ### Technical Analysis The installation metadata requests creation of two system-wide systemd unit files under `/etc/systemd/system`. Both services specify `Restart=always` and an installation target of `multi-user.target`. If enabled, these settings cause the dashboard and Tailscale proxy to operate independently of the original skill invocation, restart after process failure, and start during subsequent system boots. This creates a cross-session persistence mechanism. The persistent dashboard is described as providing access to agent messaging, task execution, documents, automation workflows, runbooks, and system metrics. Persistently exposing such an interface through Tailscale increases the consequences of weak application authentication, authorization defects, or compromise of a permitted Tailscale identity. The underlying application implementation was absent from the audited artifact, so its access controls could not be verified. ### Attack ...[truncated 1186 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not create or enable system-wide services automatically during skill installation. 2. Run the dashboard as an explicitly started, unprivileged user process by default. 3. Require informed administrator approval before installing any persistent service. 4. Bind the dashboard to localhost unless remote access is explicitly required. 5. Require strong authentication and authorization before enabling remote access. 6. Use a production server configuration rather than persistently running `npm run dev`. 7. If systemd operation is necessary: - Use a dedicated, minimally privileged service account. - Apply `NoNewPrivileges=true`. - Apply `PrivateTmp=true`. - Use `ProtectSystem=strict` and `ProtectHome=true` where compatible. - Restrict writable paths with `ReadWritePaths=`. - Limit network access with appropriate systemd controls. - Define explicit stop, disable, and uninstall procedures. 8. Log service creation, activation, remote exposure, and access events. ]]>
