Cronjob
Once you got root access on any host, you can add any scheduled task. You could even just configure a task where every minute a reverse shell is sent to you. Which is exactly what we’re going to do.
Exploitation
We are going to leverage cronjob to achieve persistence. We will create a reverse shell script and add it to /etc/crontab
so that to be executed automatically.
Now , we will setup our reverse shell listener and wait for our script to be triggered.