T06 · System Persistence
- Location
src/cli.js:210- Finding
Persistent Background Service Continuously Monitors Agent Sessions
- Content
View full analysis
Label com.dual-brain ProgramArguments ${nodePath} ${cliPath} start RunAtLoad KeepAlive StandardOutPath ${getConfigDir()}/launchd.log StandardErrorPath ${getConfigDir()}/launchd.error.log `; fs.writeFileSync(plistPath, plist); console.log('✅ LaunchAgent installed:', plistPath); try { execSync(`launchctl load ${plistPath}`); console.log('✅ Service loaded and started'); } catch (e) { console.error('❌ Failed to load service:', e.message); } } ``` ```javascript function installLinux() { const servicePath = '/etc/systemd/system/dual-brain.service'; const nodePath = execSync('which node').toString().trim(); const cliPath = execSync('which dual-brain').toString().trim(); const service = `[Unit] Description=Dual-Brain Daemon After=network.target [Service] Type=simple User=${process.env.USER} ExecStart=${nodePath} ${cliPath} start Restart=always RestartSec=10 [Install] WantedBy=multi-user.target`; try { fs.writeFileSync(servicePath, service); console.log('✅ Systemd serv ...[truncated 2245 chars]- Remediation
View remediation
