T06 · System Persistence
- Location
scripts/setup.sh:23- Finding
Persistent Systemd User Service Installed and Enabled by Default
- Content
View full analysis
"$SERVICE_FILE" <- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real LAN file-sharing tool, but it installs a persistent unauthenticated server on all network interfaces with weak file-containment guarantees.
Install only if you intentionally want a persistent unauthenticated HTTP file share from this machine. Use a dedicated empty directory, do not place secrets there, avoid symlinks, restrict access with firewall or bind-address changes, and stop/disable the systemd user service when sharing is no longer needed.
scripts/setup.sh:23Persistent Systemd User Service Installed and Enabled by Default
scripts/server.js:37Symbolic Link Escape Allows Files Outside MEDIA_ROOT to Be Served
scripts/server.js:65Unauthenticated File Server Listens on All Network Interfaces
scripts/setup.sh:4Unvalidated Environment Values Are Interpolated into a Systemd Unit
The skill instructs the agent to run setup and management commands, use environment-variable-controlled configuration, and operate a network-accessible file server, but it declares no explicit tool scope or permissions metadata. That mismatch can cause the platform to under-constrain what the skill is allowed to do, increasing the chance of unintended command execution, environment access, or network exposure without clear review boundaries.
The server binds to 0.0.0.0, making all files under MEDIA_ROOT reachable by any host on the local network without authentication, authorization, or per-file access controls. In this skill’s context, that is the core feature, but it still creates a real exposure: screenshots, documents, and other workspace artifacts may be unintentionally disclosed to anyone on the LAN who can guess or obtain the URL.
The script installs and enables a persistent systemd user service that automatically restarts and survives future sessions, which creates session persistence on the host. In the context of a LAN-accessible file server, this increases exposure because a network service continues running beyond the immediate task and may keep sharing workspace files until explicitly disabled.
# Enable and start
systemctl --user daemon-reload
systemctl --user enable media-server.service
systemctl --user restart media-server.service
echo ""
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
if ! loginctl show-user "$(whoami)" 2>/dev/null | grep -q 'Linger=yes'; then
echo ""
echo "⚠️ User lingering not enabled. Run this to survive reboots:"
echo " sudo loginctl enable-linger $(whoami)"
fi
No suspicious patterns detected.