T06 · System Persistence
- Location
SKILL.md:65- Finding
Persistent Daily Execution Through User Crontab Modification
- Content
View full analysis
/dev/null; echo "2 18 * * * cd $DDDAY_HOME && python3 generate_dashboard.py") | crontab - ``` ``` ### Technical Analysis The setup instructions modify the user's crontab and arrange for `generate_dashboard.py` to execute every day at 18:02. Although scheduling is identified as optional and is consistent with automatic dashboard generation, it creates execution that persists beyond the current Skill invocation. This persistence is not required for the Skill's manual journaling, scanning, dashboard generation, or migration features. It therefore exceeds the minimum privileges needed for those modes. The command also has the following security weaknesses: - It does not request explicit confirmation immediately before changing the crontab. - It is not idempotent. Repeated setup can add duplicate jobs. - `$DDDAY_HOME` is inserted into cron command text without shell-safe quoting. - It does not verify the ownership, permissions, or integrity of `generate_dashboard.py`. - No corresponding removal or disable procedure is documented. The cron process executes with the user's account privileges. If the dashboard script or its containing directory can later be modified by another party, the scheduled task becomes a recurring execution mechanism for that party's code. ### Attack Path 1. The user or Agent follows the optional setup instructions. 2. The command adds the dashboard generator to the user's crontab. 3. An attacker, compromised process, malicious restore bundle, or untrusted local user replaces or modifies `generate_dashboard.py`. 4. At 18:02, cron changes into `$DDDAY_HOME` and runs the modified script with the victim user's privileges. 5. The malicious co ...[truncated 709 chars]- Remediation
View remediation
