Advanced Penetration Testing for Highly:Secured Environments(Second Edition)
上QQ阅读APP看书,第一时间看更新

Putting it all together

We are now ready to build a number of the machines that we will use throughout the book. We will not completely configure the images until we are in that section of the book where they are required.

Installing Ubuntu LTS

The first machine we want to set up is the Ubuntu virtual machine. Go to http://www.ubuntu.com and download the 14.04.2 LTS Desktop iso image. Once the image has been downloaded, start VMware Workstation and click on File | New Virtual Machine to start the creation of the new machine. Accept the default and click on Next. Select the radio button for I will install the operating system later, and then click on Next. An example is shown in the following image:

The installer will next ask for the version to install. We will leave the default Guest operating system setting, select the version as Ubuntu 64-bit, and click on Next. An example is shown in the following image:

Enter a name for the virtual machine as Ubuntu_TestMachine_1 and click on Next. Accept the default sizes and click on Next. The machine is now ready to go; click on Finish. Since we elected to not install the OS with easy install, we need to connect the DVD to the iso image. Click Edit virtual machine settings | CD/DVD (SATA) | Use ISO image file:, and browse to the image file. Then, click on OK. An example is shown in the following image:

Once you have verified your settings, click on Power on this virtual machine. Enter the following settings for the installation:

  1. What is your name: Student.
  2. What name do you want to use to log in: student.
  3. Choose a password: 1easyPassword.
  4. What is the name of this computer?: Phobos.
  5. Require my password to login: Selected.

After the installation has completed, the system will reboot. Login to the machine. On the left side of the desktop, the top most icon is the software launcher; right-click on it and select Applications:

In the search window, enter terminal and open the terminal window that comes up from your search:

In the terminal window, enter the following:

$ sudo -i
# apt-get update
# apt-get upgrade

After the system has updated, we are now ready to install the services we need for the labs. Enter the following command:

# apt-get install lamp-server^

The ^ character is required for the command so that is not a typo:

You will have to enter a password for the MySQL user. For simplicity, enter the same password as you did for the user on the machine.

Installing Kioptrix

The next machine we need to install is the Kioptrix machine by Steven McElrea (aka loneferret) and Richard Dinelle (aka haken29a) of the http://www.kioptrix.com team.

Choose your language of choice and click on the KioptrixVM Level 1 link and download it. You will notice that there is another VM that has been added to the choices; but for our purposes, we will continue with the same VM from the first edition.

Once the download has completed, extract it. We only need to open the virtual machine. Once it has been extracted, click on File | Open, navigate to where the machine has been extracted, and open it. Once the machine is open, we need to make some configuration changes. Click on Edit virtual machine settings | Memory and change it to 256. Click on the Network Adapter and select NAT. The following image shows the settings for the machine:

Now that we have Kioptrix Level 1 on the machine, it is time to download the Level 3 VM. Using the same techniques as before, download and create the machine for Kioptrix Level 3, located at the Kioptrix VM Level 1.2 link. The following image shows this:

As before, once it is downloaded you need to extract it. Once the machine is extracted, use the same concepts as before and configure the machine with the same networking settings. Leave the rest at the default. An example of this is shown in the following image:

After you have verified your settings, the virtual machine setup at this point is complete.

Creating pfSense VM

As discussed in the first edition, the pfSense firewall is much more than just a firewall, and it is easy to install and configure. This suits our purposes here in our testing environment. Download the software located at http://www.pfsense.org/mirror.php?section=downloads. We need to select the right version; at the time of writing, this was 2.2. Select a Computer Architecture and Live CD with Installer. An example is shown in the following image:

Once you have downloaded the software and extracted the iso, we need to create a virtual machine to install it. Open VMware Workstation and click on File | New Virtual Machine | Next. Select Installer disc image file (iso) and browse to the iso image. Then, click on Next.

Select Other and FreeBSD 64 under Version. Click on Next.

Enter the appropriate name as PFSense VLAN1 and click on Next. At the next screen, accept the defaults and click on Next. Then click on Finish. When the machine opens, we have to customize the hardware to meet our requirements. We need another switch to set up a VLAN with. Click on Edit | Virtual Network Editor | Add Network; this will bring up the network configuration window, and we want to configure the following:

  1. VMnet9 – 192.168.175.
  2. Uncheck Use local DHCP service to distribute IP address to VMs.
  3. Once you have verified your settings, click on Apply | OK.
  4. The next thing to do is click on Edit virtual machine settings | Add | Next | Custom | VMnet9 | Finish | OK.

Once you have verified that your settings are correct, you are done for now. We will install and configure the machine later in the book.