T06 · System Persistence
- Location
heartbeat.md:111- Finding
Persistent Five-Minute Cron Job Introduces Unnecessary Cross-Session Execution
- Content
View full analysis
> /var/log/solclaw-heartbeat.log 2>&1 ``` ### Technical Analysis The instructions encourage users to install a cron entry that executes `heartbeat.sh` every five minutes and persists across terminal sessions, reboots, and individual skill invocations. Periodic monitoring is related to the heartbeat functionality, but permanent operating-system scheduling is not necessary for the core on-demand payment functionality. The cron entry trusts a mutable filesystem path without documenting ownership, integrity controls, restrictive permissions, or safe removal. If another account or process can modify the script or one of its parent directories, the scheduled job becomes a recurring command-execution mechanism under the account that installed it. The suggested `/var/log/solclaw-heartbeat.log` destination may require elevated permissions on typical systems. This could lead users to run setup steps with unnecessary privileges or weaken log-file permissions. ### Attack Path 1. A user creates `heartbeat.sh` and installs the provided cron entry. 2. The scheduled task remains active across future sessions and system restarts. 3. An attacker compromises or replaces the referenced script, or gains write access to one of its parent directories. 4. Cron executes the modified script automatically every five minutes. 5. The attacker's commands run with the permissions of the user who owns the crontab. 6. If the task was installed under a privileged account, the resulting commands inherit that account's broader access. ### Impact Assessment Successful exploitation provides recurring command execution under the cron owner's account. This can expose files, wallet configuration, environment ...[truncated 439 chars]- Remediation
View remediation
