T06 · System Persistence
- Location
scripts/setup-daemon.sh:17- Finding
PM2 Setup Establishes Cross-Session System Persistence
- Content
View full analysis
/dev/null || pm2 restart qwen-daemon echo "💾 Saving PM2 state..." pm2 save echo "🔧 Setting up startup..." pm2 startup 2>/dev/null || echo " (run 'pm2 startup' manually if needed)" ``` ### Technical Analysis The setup script does more than start a daemon for the current session. It saves the daemon in PM2's persistent process list and invokes `pm2 startup`, which attempts to configure operating-system startup integration. Consequently, the authenticated browser daemon can be restored after a restart or login session. Although the persistence behavior is documented, it changes host startup configuration and outlives the Skill invocation. It therefore constitutes cross-session system persistence. The use of `--no-autorestart` only prevents PM2 from immediately restarting the process after an ordinary process exit. It does not negate the persistence created by `pm2 save` and the operating-system startup integration. ### Attack Path 1. A user or agent follows the documented daemon setup procedure. 2. `scripts/setup-daemon.sh` starts `qwen-daemon.js` under PM2. 3. `pm2 save` records the daemon in PM2's saved process state. 4. `pm2 startup` attempts to create or configure a startup service. 5. PM2 can restore the daemon during later system or user sessions without another direct Skill invocation. ### Impact Assessment The setup can modify startup configuration for the account running it and maintain a long-lived Chromium process containing authenticated Qwen state. If the command is run with elevated privileges, the startup integration may have a broader system scope. No evidence was found that the daemon is an intentionally concealed backdoor. Nevertheless, persist ...[truncated 157 chars]- Remediation
View remediation
