T06 · System Persistence
- Location
scripts/setup-vnc.sh:31- Finding
Boot-Persistent Desktop and Remote-Control Services
- Content
View full analysis
/dev/null [Unit] Description=Xvfb Virtual Display :99 After=graphical.target Wants=graphical.target [Service] Type=simple ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 -nolisten tcp -dpi 96 Restart=always RestartSec=1 User=$USER Environment="HOME=$HOME_DIR" [Install] WantedBy=multi-user.target EOF ``` The script similarly creates `xfce-minimal.service`, `x11vnc.service`, and `novnc.service`, each with boot targets and automatic restart behavior: ```bash [Service] Type=simple ExecStart=/usr/bin/x11vnc -display :99 -forever -shared -rfbport 5900 -noxdamage -noxfixes -noclipboard Restart=always RestartSec=2 User=$USER Environment="HOME=$HOME_DIR" Environment="DISPLAY=:99" [Install] WantedBy=multi-user.target ``` The services are then enabled and started: ```bash sudo systemctl daemon-reload sudo systemctl enable xvfb xfce-minimal x11vnc novnc sudo systemctl start xvfb sleep 2 sudo systemctl start xfce-minimal sleep 3 sudo systemctl start x11vnc sleep 1 sudo systemctl start novnc ``` ### Technical Analysis The setup script uses `sudo` to write four system-wide unit files under `/etc/systemd/system`. It enables them for `multi-user.target` and configures every service with `Restart=always`. Consequently, the virtual desktop and its remote-control interfaces survive termination of the Skill process, user logout, service crashes, and system reboots. Persistence is disclosed in `SKILL.md` as an installation feature. Nevertheless, it is not required for individual screenshot, keyboard, mouse, or on-demand VNC operations. A less-privileged design could run these components as transient user processes or user-scoped services and ...[truncated 1356 chars]- Remediation
View remediation
