T06 · System Persistence
- Location
install.sh:45- Finding
Persistent LaunchAgent Installed and Kept Alive Without Separate Opt-In
- Content
View full analysis
"$PLIST_PATH" << EOF Label com.lobster.api-proxy ProgramArguments /usr/bin/python3 ${INSTALL_DIR}/proxy.py --port ${PROXY_PORT} --upstream ${UPSTREAM} --log-dir ${LOG_DIR} RunAtLoad KeepAlive StandardOutPath ${LOG_DIR}/proxy.stdout.log StandardErrorPath ${LOG_DIR}/proxy.stderr.log WorkingDirectory ${INSTALL_DIR} EOF # 6. Load LaunchAgent launchctl unload "$PLIST_PATH" 2>/dev/null || true launchctl load "$PLIST_PATH" ``` ### Technical Analysis The installer creates a macOS LaunchAgent with both `RunAtLoad` and `KeepAlive` enabled and immediately loads it. Consequently, the API interception proxy starts automatically in future login sessions and is restarted whenever it exits. Continuous operation can be useful for transparent API logging, and the behavior is disclosed in the documentation. However, an always-on, self-restarting service is not the minimum privilege or lifetime required for an on-demand log viewer or manually operated proxy. The installer provides no separate persistence confirmation, nonpersistent installation mode, ...[truncated 1180 chars]- Remediation
View remediation
