Some programs come with backdoors embed in them,I am going to show you how to go about exploiting these.
Firstly,we will use a tool called Nmap which will allow us to discover which ports and services are running on the machine. For this example I will be using Metasploitable 2.
To Install Nmap on Linux
>> sudo apt-get install nmap
To Install Nmap on Windows
Let's start!
Step 1.
We will start off by calling Nmap and run this against our machine, in this case our IP is 10.0.2.6.
![Nmap Scan](https://static.wixstatic.com/media/642e54_89117e3dfd9949b09127c370d54361a3~mv2.jpg/v1/fill/w_824,h_602,al_c,q_85,enc_auto/642e54_89117e3dfd9949b09127c370d54361a3~mv2.jpg)
After our Nmap scan has completed we can see our machine is running quite a few servers on it,
Step 2.
We can easily access this machine via FTP as this allows an Anonymous login, but we are going to take a different approach by executing a Backdoor Command Execution.
To start, let us do a quick google search on the version to see if there is any exploits already available to us.
![](https://static.wixstatic.com/media/642e54_89a470cea7574046a7227c98e8bc4d9b~mv2.png/v1/fill/w_899,h_354,al_c,q_85,enc_auto/642e54_89a470cea7574046a7227c98e8bc4d9b~mv2.png)
We can see that Rapid7 has already found and provided some documention to show us how to execute this via metasploit, so let's start!
![](https://static.wixstatic.com/media/642e54_3ca5d28b841245a5a940e17a62432350~mv2.jpg/v1/fill/w_809,h_507,al_c,q_85,enc_auto/642e54_3ca5d28b841245a5a940e17a62432350~mv2.jpg)
After we run this command, we will then follow up by running the show options command which will provided us with all the options availble.
![](https://static.wixstatic.com/media/642e54_5edb16cbb2404af4bf516fe11a362617~mv2.jpg/v1/fill/w_820,h_379,al_c,q_80,enc_auto/642e54_5edb16cbb2404af4bf516fe11a362617~mv2.jpg)
We must firstly set our TARGET which we can set to 0.
We can see that this payload only takes two arguments, the RHOSTS and RPORT, which is set to the default port 21.
![](https://static.wixstatic.com/media/642e54_6052b18145d944ae91f073d0d641e828~mv2.jpg/v1/fill/w_822,h_448,al_c,q_85,enc_auto/642e54_6052b18145d944ae91f073d0d641e828~mv2.jpg)
Once we have all our options filled in, we can then continue to execute this payload by running the command exploit.
![](https://static.wixstatic.com/media/642e54_08a49dff9e414ed48ff78f5a33095b11~mv2.jpg/v1/fill/w_813,h_565,al_c,q_85,enc_auto/642e54_08a49dff9e414ed48ff78f5a33095b11~mv2.jpg)
We have now succesfully gained access into the machine via a Backdoor Command Execution !
Commands used
msf > use exploit/unix/ftp/vsftpd_234_backdoor msf exploit(vsftpd_234_backdoor) > show targets msf exploit(vsftpd_234_backdoor) > set TARGET msf exploit(vsftpd_234_backdoor) > show options msf exploit(vsftpd_234_backdoor) > set RHOSTS msf exploit(vsftpd_234_backdoor) > exploit
Hashtags
#hacking #hacker #cybersecurity #ethicalhacking #hackers #linux #programming #hack #technology #kalilinux #security #coding #infosec #python #tech #hackingtools #ethicalhacker #pentesting #cyber #malware #programmer #computerscience #cybercrime #cyberattack #informationsecurity #hacked #anonymous #cybersecurityawareness #coder #metasploit
Comments