T06 · System Persistence
- Location
SKILL.md:20- Finding
Installation of a Persistent Autonomous Watchdog Service
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20–25, 50–66, and 114–117
Vulnerability Type: System persistence through launchd or systemd scheduled services
Risk Level: HighThe skill instructs the agent to install an operating-system scheduler that survives the skill invocation and autonomously relaunches egregore sessions every five minutes.
Relevant code:
markdown Installs a persistent daemon that monitors the egregore process and relaunches it when needed. The daemon uses the OS-native scheduler (launchd on macOS, systemd on Linux) to run a watchdog script every 5 minutes.markdown ### 2. Run the appropriate installer **macOS (launchd):** ```bash bash plugins/egregore/scripts/install_launchd.shThis script creates a plist at
~/Library/LaunchAgents/com.egregore.watchdog.plistthat runs the watchdog script every 300 seconds (5 minutes).Linux (systemd):
bash bash plugins/egregore/scripts/install_systemd.shThis script creates a systemd timer and service unit at
~/.config/systemd/user/that fires every 5 minutes.text ```markdown - **systemd user session not available**: run `loginctl enable-linger $USER` to enable user services without an active login session.Technical Analysis
The instructions establish cross-session persistence through either a macOS LaunchAgent or Linux systemd user timer. The resulting scheduler invokes a watchdog every five minutes and may launch new egregore sessions without an interactive request at execution time.
On Linux, the recommendation to run
loginctl enable-linger $USERextends this behavior beyond active login sessions. This permits the user-level service manager and its scheduled workload to continue operating after logout.The installation is disclosed and appears related to the stated watchdog functionality. Nevertheless, it creates durable autonomous execution and therefore meets the definition of system persistence. The actual installer ...[truncated 1720 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not install or activate a persistent scheduler without explicit, informed user approval immediately before installation.
- Prefer an opt-in, foreground watchdog that terminates with the current session.
- Require separate confirmation before enabling
loginctllingering, and clearly explain that it permits execution after logout. - Display the complete LaunchAgent plist, systemd unit files, timer configuration, and watchdog script before requesting approval.
- Pin and verify the integrity of all referenced scripts before execution; do not execute scripts that are absent from the reviewed package.
- Restrict the service to the minimum required user permissions and use a constrained environment, fixed executable paths, and restrictive file permissions.
- Add execution limits, budget limits, rate controls, and a user-controlled disable switch to prevent uncontrolled relaunch loops.
- Provide a local uninstall procedure that unloads and removes every installed unit, disables lingering when no longer required, and verifies that no watchdog process remains.
- Log every launch attempt and expose the service status and next scheduled run to the user.
- Require renewed authorization before the watchdog launches each agent session if autonomous relaunching is not strictly necessary.
