Looking for weakness
Now that we have a stable shell, we need to look for vulnerabilities, misconfigurations, or anything that will help us in escalating privileges on the system. In this recipe, we will look at some of the ways in which privileges can be escalated to get the root of the system.
How to do it...
The basic step I would recommend to all of you after we have a shell on a server is to do as much enumeration as possible: the more we know, the better we have a chance of escalating privileges on the system.
The key steps to escalating privileges, as mentioned on g0tmi1k
, on a system are as follows:
- Collect: Enumeration, more enumeration, and some more enumeration.
- Process: Sort through data, analyze, and prioritize.
- Search: Know what to search for and where to find the exploit code.
- Adapt: Customize the exploit so it fits. Not every exploit works for every system out of the box.
- Try: Get ready for (lots of) trial and error.
We will look at some of the most common scripts available on the...