Privilege escalation on Linux
For some penetration testing projects, getting a web-shell may be enough in terms of exploitation and demonstration of the impact of a vulnerability. In some other cases, we may need to go beyond that to expand our level of privilege within that server or to use it to pivot to other hosts in the network.
In this first recipe about privilege escalation, we will draw on the previous recipe where we uploaded and executed a reverse shell to our attacking machine and use tools included in Kali Linux to gain administrative access on the server.
Getting ready
It is recommended that the previous two recipes, Executing commands by exploiting Shellshock and Creating and capturing a reverse shell with Metasploit, be completed before starting this one, although it is possible to achieve the same results from any limited shell on a remote server.
How to do it...
We have a meterpreter shell running on a compromised server—more specifically, bee-box with the IP 192.168.56.12
. Let...