Building a penetration testing lab cluster at low-cost with virtualization support, further to be used for research and analysis.If you don’t have access to a pentest environment you should build up your own penetration testing lab.If you need a wide range of hosts you should also use virtualization.So today we show you how to build a virtualization cluster to be further used as a penetration testing lab.
Recently I was testing some different virtual solutions like VMware(ESXi), VirtualBox and KVM.Then I found Proxmox and sincerely the reason I like this software is because it is Open Source , it’s Debian based and it’s easy to set up a Cluster.However I found that this software it also support KVM and OpenVZ.Another feature is the live migration (one virtual host can be switched to another physical member of the cluster without shutting down).Ok , so basically the installation of Proxmox is very simple but there are some system requirements.
It requires an 64bit AMD or Intel CPU and a minimum 1 GB of RAM, if you want to use KVM the CPU must have Full virtualization support otherwise you can still use OpenVZ to create the virtual containers.The installation itself can be made by using a cd image of proxmox or you can also put it on a USB stick.I have used a stick to install it and I must say that I have faced some errors but yes I succeeded to finish the installation process.
Installation from USB stick
(Skip this section if you’re going to use the CD instead of USB)
To perform the installation from USB stick you will need to download first the latest ISO from here then you will need a tool like Unetbootin (if you are using Linux) or USB universal installer if you are using Windows.These will help you to write the files needed to boot on your stick.You will also need to check if your computer is set up to boot from a USB drive, otherwise browse your BIOS setting.I hope everyone it’s familiar with Unetbootin and Universal USB Installer cause I’m going to skip this section.Create the usb image and wait until the process is complete.In theory you can delete all the files on your stick except the boot folder because since we will install it from an Iso image we do not need them.After this step you should copy the image of Proxmox on your root USB directory.Now the usb should boot but we must specify what to boot and where to install it.Boot USB and type “debug” for debug mode.At the end of the boot process there will be an error “no cdrom found – unable to continue (type exit or Ctrl-D to reboot)”.At this point you must identify your usb and mount it.Fdisk will help you.”fdisk -l”. Mount the found device on some folder, my device was /dev/sdb1 so I made
mount /dev/sdb1 /mnt
At this point we will need to mount the ISO that we have put before on the root directory of our stick.
mount -o loop -t iso9660 /mnt/proxmox.iso /mnt
With a little bit of googling i figure out that the command to start-up the installer was chroot /mnt sbin/unconfigured.shIf everything was as we expected you will see the proxmox GUI installer with the wizard installation.
Installation from CD
This process is very simple , however they have already made some tutorials so here is the official video installation guide Proxmox VE installation (Video)
Building The Cluster
So basically to create a cluster we need first install, at least two Proxmox servers.Each proxmox server must have a unique hostname.By default all server has the same host name (you can change the hostname during the installation process). I have used 3 physical servers.I have made a fresh proxmox installation on these 3 systems:
After the installation we must define a Master node.First however i recommend to check that Date/time are in sync in all nodes, all modes must use the same date and time values.Login via ssh to the first Proxmox VE server (this node will become Master), so I choose Echelon.We need to create and name the cluster.
pvecm create Morpheus
In this laboratory i created a cluster called Morpheus.To see the cluster status you can use
There also exist a manual page for pvecm (Proxmox VE cluster manager toolkit).So now suppose we want to add an additional node into the cluster (we must add Nexus and Phoenix)Login via ssh to the node you wish to add into the cluster and drop the following command to have this node joining the custer.
pvecm add cluster_ip_address
Let’s suppose we need to join nexus , we will login via ssh to the nexus host and will issue the following command:
pvecm add 192.168.123.102
This will join Nexus to Echelon (192.168.123.102).The same procedure we will take to join phoenix into the cluster.At the end we could see the cluster nodes with the following command:
Cluster Status for Morpheus @ Sat Dec 8 13:44:55 2012
Member Status: Inquorate
Member Name ID Status
—— —- —- ——
echelon 1 Online, Local
nexus 2 Online
phoenix 3 Online
The cluster can be managed from the centralized web interface.If everything went fine,you should be able to connect to one of the node , any of them by using the following address https://nodename:8006 .To login you will need to use your system credentials.You should see a user-friendly web interface to manage your virtual hosts by using OpenVZ or KVM.