T06 · System Persistence
- Location
SKILL.md:33- Finding
Persistent Auto-Restart Watchdog for Session Monitoring
- Content
View full analysis
/dev/null) if [ -z "$PID" ] || ! ps -p "$PID" > /dev/null 2>&1; then cd scripts && node index.js > monitor.log 2>&1 & fi ``` ### Technical Analysis The Skill explicitly instructs the agent to place an auto-restart watchdog in `HEARTBEAT.md`. Unlike a foreground monitor limited to the initiating task, this hook is intended to execute during later heartbeat cycles and restart the monitor whenever its process is missing. This creates cross-session persistence. Process termination or cleanup does not reliably stop the monitoring capability because a subsequent heartbeat can launch it again. The relaunched process then resumes polling session transcripts and sending formatted data to Telegram. ### Attack Path 1. The user or agent follows the Skill instructions and adds the supplied watchdog to `HEARTBEAT.md`. 2. The monitor starts as a detached background process. 3. The original execution session ends, or the monitor is terminated by cleanup. 4. A later heartbeat evaluates the persistent watchdog. 5. The watchdog reads the PID file and determines that the monitor is absent. 6. It launches `node index.js` again in the background. 7. Transcript monitoring and Telegram transmission resume without a new invocation of the Skill. ### Impact Assessment The watchdog can preserve the monitor across execution-session boundaries and repeatedly restore it after termination. Its effective privileges are those of the account processing `HEARTBEAT.md`, including access to every configured session directory and permission to transmit data using the configured Telegram bot. T ...[truncated 195 chars]- Remediation
View remediation
