🔬Cron Jobs

Lab 1

🔬 Cron Jobs Gone Wild II

  • Cron Jobs Privilege escalation

  • Already logged on as student unprivileged user

whoami
groups student
cat /etc/passwd
crontab -l

📌 student user has no privileges and no scheduled cron jobs

Cron Jobs Identify

  • Look for all occurences of the path or the file, on the system

  • The file has been copied into the /tmp directory

  • Check copy.sh privileges

Privesc

  • Every user account has read/write/execute permissions on the copy.sh script

  • The script is writable by the student user. Modify the script to execute a command (e.g. adding student to sudoers file).

    • When the script is executed by root cron job (every 1 min for this lab), it will run commands with pivileged permissions

    • No text editors available in the lab

sudo -l
Reveal Flag: 🚩

697914df7a07bb9b718c8ed258150164


Last updated

Was this helpful?