T06 · System Persistence
- Location
SKILL.md:115- Finding
Persistent Notification Polling Through a Recurring Cron Job
- Content
View full analysis
/usr/local/bin/check-sysclaw-notifications.sh << 'SCRIPT' #!/bin/bash export SYSCLAW_DB_HOST="" export SYSCLAW_DB_PORT="5432" export SYSCLAW_DB_NAME="system_comm" export SYSCLAW_DB_USER="" export SYSCLAW_DB_PASSWORD="" bash "/scripts/check-notifications.sh" > "/memory/notifications.md" 2>/dev/null SCRIPT chmod +x /usr/local/bin/check-sysclaw-notifications.sh # Add to crontab (crontab -l 2>/dev/null; echo "*/15 * * * * /usr/local/bin/check-sysclaw-notifications.sh") | crontab - ``` ### Technical Analysis The installation instructions create an executable in `/usr/local/bin` and register it in the current user's crontab. The command consequently survives the current Skill invocation and executes every 15 minutes across later sessions. This persistence is not required for the Skill's core purpose of reporting issues, submitting requests, and checking responses. The documentation already provides an explicit `check-notifications.sh` command that can be run at session start. The recurring task therefore exceeds the minimum execution scope needed for the declared functionality. Writing to `/usr/local/bin` will commonly require elevated installation privileges. The cron task itself runs with the privileges of the user whose crontab was modified; it does not independently escalate privileges. The append operation also lacks duplicate detection, so repeated installation can create multiple identical scheduled entries. ### Attack Path 1. A user follows the documented post-install procedure. 2. A persistent wrapper is created under `/usr/local/bin`, potentially using elevated privileges. 3. The wrapper, including its configu ...[truncated 883 chars]- Remediation
View remediation
