Post Exploitation
Last updated
Was this helpful?
Last updated
Was this helpful?
Analyzing what commands we cun run we note the following
We see that we cun runn simpler.py as pepper. Analyzing that file we learn that it does not filter the '$' character, we can take advantage of that as follows.
Whatever is in the parenthesis will be executed first.
Running the following gave me a better shell
Running LinEnum.sh, we learn the following:
On our attacker machine, create the following. root.service with the following content
Copy it to our target machine and run the following:
Set up your listener and run the following to start the service
The systemctl binary has the setuid bit set and it’s owned by root. We can use that to our advantage and escalate to root privileges. If you’re not sure how to do that, you can search the binary name on and check how the suid bit can be used to escalate privileges.