Local Linux privilege escalation
In this recipe, we will use a known exploit to gain elevated privileges for the logged-in user in Linux. We will have login credentials for a standard user and we will then escalate their privileges through local account access.
Getting ready
Let's ensure the following prerequisites:
- Your Kali VM is up and running
- Download and set up Vulnerable OS 2 (VulnOS2) from https://www.vulnhub.com/entry/vulnos-2,147/
- Attach the network interface to your host-only network
- Start your VulnOS2 image
Note
Refer to Chapter 1, Installing Kali and the Lab Setup, if you need assistance setting up the VM in VirtualBox.
How to do it...
We will now elevate privileges in Linux:
- Start by finding the IP address of the VulnOS2 image – we can use a simple
nmap
scan to find it. Open a terminal window by clicking on the terminal icon. - Enter the following commands to run a quick
nmap
for the host-only network of192.168.56.0/24
:
nmap -T4 -F 192.168.56.0/24
- From our output, we can see that the address...