T06 · System Persistence
- Location
SKILL.md:203- Finding
Persistent execution through a macOS LaunchAgent
- Content
View full analysis
ProgramArguments /path/to/llmrouter/venv/bin/python /path/to/llmrouter/server.py --openclaw RunAtLoad KeepAlive WorkingDirectory /path/to/llmrouter StandardOutPath /path/to/llmrouter/logs/stdout.log StandardErrorPath /path/to/llmrouter/logs/stderr.log ``` ```bash # Load the service launchctl load ~/Library/LaunchAgents/com.llmrouter.plist # Verify it's running curl http://localhost:4001/health # To stop/restart launchctl unload ~/Library/LaunchAgents/com.llmrouter.plist launchctl load ~/Library/LaunchAgents/com.llmrouter.plist ``` ### Technical Analysis The documented LaunchAgent executes `server.py` whenever the user session loads. Setting both `RunAtLoad` and `KeepAlive` causes the process to start automatically and be restarted after termination. A continuously available service may be convenient for an LLM proxy, but it is not necessary for the Skill's basic routing functionality. The document already supports foreground, user-initiated execution with `python server.py`. Consequently, persistent execution exceeds the minimum lifecycle privileges required to demonstrate or use the router. The LaunchAgent runs downloaded project code with the permissions of the logged-in user. It does not directly grant root privileges, but it creates a durable execution point for code that is outside the audited artifact. ### Attack Path 1. A user clones the external router repository and installs its dependencies. 2. The user creates `~/Library/LaunchAgents/com.llmrouter.plist` using the documented configuration. 3. The user executes `launchctl load ~/Library/La ...[truncated 975 chars]- Remediation
View remediation
