Cron tab exploitation
How to view what Cronjobs are active.
We can use the command "cat /etc/crontab" to view what cron jobs are scheduled. This is something you should always check manually whenever you get a chance, especially if LinEnum, or a similar script, doesn't find anything.
then if for example we find a crontab running a writable script as root, we can write to the cron tab to execute commands as root.
e.g. */5 * * * * root /home/user4/Desktop/autoscript.sh
runs every five minutes, we can write something like a msfvenom payload to it to give us a root reverse shell.
Last updated