Skip to main content

Enumerate Cron Jobs

Watch for Cron Execution (pspy)

Look for commands run by UID 0 (root).

Writable Cron Scripts

If a cron job runs a script as root and you can write to it:

Check Permissions

Inject Reverse Shell

Inject SUID bash

Wait for cron → then:

PATH Hijacking

If /etc/crontab has a writable directory in PATH before system dirs:
If cron calls backup.sh without full path and /home/user is writable:

Wildcard Injection

tar Wildcard

If cron runs:
The * expands filenames as arguments. Create files that become tar flags:

rsync Wildcard

If cron runs:

chown Wildcard

If cron runs:

Writable Cron Directory

If /etc/cron.d/ is writable:

Systemd Timers

Check service file for writable script:
If ExecStart points to writable file → inject payload.

Overwrite /etc/crontab

If /etc/crontab is writable: