We have already learned how to spawn a TTY shell by performing enumeration. In this recipe, we will look at some of the methods where horizontal escalation can be performed to gain more privileges on the system.
Horizontal escalation
How to do it...
Let's perform the following steps:
- Here, we have a situation where we have got a reverse shell, www-data.
- Run sudo --list. We will find that the user is allowed to open a configuration file as another user, waldo:
- We need to open up the file in the VI Editor. To get a shell in VI, we must type the following:
!bash
After executing the !bash command, we get the following screen:
- We now have a shell with the waldo user. Our escalation was successful.
- In some cases, we...