T05 · Unauthorized Access and Privilege Escalation
- Location
README.md:90- Finding
Root Cron Job Executes Code from a User-Controlled Directory
- Content
View full analysis
> /var/log/feeds-digest.log 2>&1 EOF ``` ``` ### Technical Analysis The documentation recommends a system-wide cron entry that runs the Skill as `root`, even though generating a feed digest does not require administrative privileges. The executable is located under `/home/HolBot`, a location that may be writable by the unprivileged `HolBot` account. The Python entry point also imports modules from its adjacent `scripts/lib` directory. Consequently, write access to either `feeds-digest.py` or an imported Python module can become a path to scheduled root-level code execution. The installer does not automatically create this cron job, so exploitation requires an administrator to follow the documented system-wide setup. Nevertheless, the recommended configuration violates least privilege and creates an avoidable privilege boundary. ### Attack Path 1. An administrator installs the documented `/etc/cron.d/feeds-digest` entry. 2. The project directory or one of its Python files remains writable by `HolBot` or another compromised unprivileged account. 3. The attacker modifies `scripts/feeds-digest.py` or a module under `scripts/lib/` to run an arbitrary command. 4. Cron invokes the modified script according to the schedule. 5. The injected code executes with root privileges. ### Impact Assessment Successful exploitation provides arbitrary root-level code execution ...[truncated 451 chars]- Remediation
View remediation
