# Post Exploitation

```
sudo -l 
```

We can look at our current privleges by looking at the sudo -l command.&#x20;

![Looks like we can run monitor.sh as root](https://4057777515-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHH7KhyMHFxZjjhb__O%2F-MHQz3pPHLX33Flkfi1l%2F-MHRApvS3z2IAZUnLImT%2Fimage.png?alt=media\&token=b53a16f6-7159-46dd-856f-2baa0dfd3598)

![personal directory and monitor.sh file do not exist](https://4057777515-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHH7KhyMHFxZjjhb__O%2F-MHQz3pPHLX33Flkfi1l%2F-MHRBeyxWNyDYwIXhxO0%2Fimage.png?alt=media\&token=7db53683-112e-4d8f-9dd6-9d2ed3fd1477)

Since the directory personal and the file do not exist I created them. The monitor.sh script contains the following and turned it into an executable with chmod +x command.

![Reverse connection to my machine.](https://4057777515-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHH7KhyMHFxZjjhb__O%2F-MHQz3pPHLX33Flkfi1l%2F-MHRD0CPnj17VfwhS8Pd%2Fimage.png?alt=media\&token=4d4398f5-db5a-4845-985a-0ba4a0a24ed2)

After setting up a listener on my machine and running the monitor.sh script, we get a connection with root!

![](https://4057777515-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHH7KhyMHFxZjjhb__O%2F-MHQz3pPHLX33Flkfi1l%2F-MHRH31TfSrFHr8dJ73C%2Fimage.png?alt=media\&token=cccfaf37-413f-4147-8e74-f5c01937f5e6)
