Linux escalation via scheduled jobs and services — writable cron scripts/entries, wildcard (tar/rsync) injection in cron commands, writable systemd unit files or ExecStart targets, PATH-relative cron commands, and timer abuse. Identification, safe PoC, remediation. Use when linux-discovery finds cron jobs or systemd units with weak permissions.
16 stars
0 votes
0 copies
2 views
Added November 17, 2026
securityrustshellbackend
Security analysis
B85/100
highCreates or modifies cron jobs for persistent execution
highCreates or modifies cron jobs for persistent execution
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Linux Cron Service Abuse?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-linux-cron-service-abuse)
---
name: linux-cron-service-abuse
description: Linux escalation via scheduled jobs and services — writable cron scripts/entries, wildcard (tar/rsync) injection in cron commands, writable systemd unit files or ExecStart targets, PATH-relative cron commands, and timer abuse. Identification, safe PoC, remediation. Use when linux-discovery finds cron jobs or systemd units with weak permissions.
---
# Cron & Service (systemd) Abuse
Root-run scheduled jobs and services with weak permissions let a low-priv user get code executed as root. Prove benignly and revert.
## Trigger phrases
`cron privesc, writable cron, systemd unit abuse, wildcard injection, tar wildcard, pspy, timer abuse`
## Identify
```
cat /etc/crontab; ls -la /etc/cron.*; crontab -l
pspy64 # observe root cron/processes without root (timing, args)
systemctl list-timers; ls -la /etc/systemd/system/ /lib/systemd/system/
find / -name "*.service" -writable 2>/dev/null
```
Look for: a cron/service that executes a **writable script**, a cron command using a **relative path** (PATH hijack), a job running `tar/rsync/7z *` in a directory you can write (**wildcard injection**), or a **writable `.service` / ExecStart** binary.
## Exploit (safe PoC)
- **Writable script:** append a benign line that writes a root-owned timestamped marker to `/tmp`, wait for the run, confirm ownership `root`, then **remove your line**.
- **Wildcard injection:** drop crafted filenames (`--checkpoint=1`, `--checkpoint-action=exec=...`) that cause `tar` to run a benign command; confirm; clean up the files.
- **Writable unit / ExecStart:** point ExecStart at a benign marker command, `systemctl daemon-reload` + wait/trigger, confirm, then restore the original unit.
## Safe-PoC discipline
Benign marker only (no shells/backdoors); always restore the original job/unit/script and record the change.
## Remediation to report
Make cron scripts root-owned and non-writable, use absolute paths, avoid shell wildcards on untrusted dirs, lock down systemd unit permissions.
## Backend / Verification
Target shell + `pspy`. **Background-verify** the job actually executed your benign marker as root (check file owner) before CONFIRMED; one run is proof, re-observe to rule out coincidence.
## Evidence
The writable job/unit, the root-owned marker, timing proof, remediation. Always revert.