T06 · System Persistence
- Location
scripts/install_proxy_skill.py:90- Finding
Installer Automatically Establishes Cross-Session Persistence Through Cron and systemd
- Content
View full analysis
> ~/.openclaw/logs/proxy_check.log 2>&1 @reboot cd ~/.openclaw/workspace/skills/proxy-auto-config && python3 scripts/gateway_proxy_setup.py >> ~/.openclaw/logs/gateway_proxy_setup.log 2>&1 """ cron_file = os.path.expanduser("~/.openclaw/proxy_cron") with open(cron_file, 'w') as f: f.write(cron_content) subprocess.run(['crontab', cron_file], check=True, capture_output=True) ``` ```python subprocess.run( ['systemctl', '--user', 'enable', 'openclaw-proxy-check.timer'], capture_output=True ) subprocess.run( ['systemctl', '--user', 'start', 'openclaw-proxy-check.timer'], capture_output=True ) ``` ```python create_cron_job() create_gateway_hook() create_systemd_integration() ``` ### Technical Analysis Running the installer automatically creates an hourly cron task, an `@reboot` task, and an enabled user-level systemd timer. These mechanisms continue executing after the original Skill invocation and across user sessions. Periodic proxy checking is part of the declared functionality, so the persistence is not hidden. However, the installer establishes two overlapping scheduling mechanisms without a dedicated opt-in, confirmation prompt, or choice of scheduler. It also does not provide uninstall or integrity-verification logic. The scheduled commands execute Python files from a writable path under the user's home directory. If those files are subsequently modified or replaced, cron and systemd will execute the changed content automatically. ### Attack Path 1. The user runs `python3 scripts/install_p ...[truncated 822 chars]- Remediation
View remediation
