In this section, we are going to use a local exploit to escalate our privilege.
To demonstrate this, we will use the following virtual machines:
Metasploitable 2 as our victim machine with an IP address of
172.16.43.156
Kali Linux as our attacking machine with an IP address of
172.16.43.150
First, we identify the open network services available on the victim machine. For this, we utilize the Nmap port scanner with the following command:
nmap –p- 172.16.43.156
We configure Nmap to scan for all the ports (from port 1
to port 65,535
) using the -p-
option.
The following screenshot shows the brief result of the preceding command:
After researching on the Internet, we found that the distccd
service has a vulnerability that may allow a malicious user to execute arbitrary commands. The distccd
service is used to scale large compiler jobs across a farm of similarly configured systems.
Next, we search in Metasploit to find whether it has the exploit for this vulnerable...