Skip to content
Back to skills

Linux Cron Service Abuse

BSecurity

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

Pro shows the line behind each finding and how to fix it

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill linux-cron-service-abuse --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Linux Cron Service Abuse?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Linux Cron Service Abuse
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-linux-cron-service-abuse/badge)](https://www.skillsdirectory.com/skills/anandjogawade-linux-cron-service-abuse)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.