Building a virtual network lab for pentesting with GNS3, dynamips, qemu/pemu and VMWare Workstation9

Building a DMZ lab for pentesting in GNS3 and VMWare Workstation9 (Part I: Software setup)

Allright fellows, second post.

The goal of the following series of posts is how to setup a DMZ network environment with the help of GNS3, dynamips, qemu/pemu and VMWare Workstation 9.

The use of a network simulator and virtual machines is a good setup for a versatile pentesting lab, since it can resemble almost any network/OS combination out in the wild; within the given hardware and software restrictions.

There are some limitations though. With Cisco switch IOS’s code being propriety, it is impossible to simulate those directly. Yet, with a modified router IOS a Cisco switch with features like VLAN and trunking can be simulated.

The main objective is to be able to test various attack scenarios in a lab environment, that includes port-forwarding, DMZ architecture and testing of Firewall/IDS components like IPCop and SecurityOnion.

In the follow-up I want also to show some classic pentesting scenarios like a client-side attack, a web server attack from the outside and MITM attacks from certain entry points of the network.

But first off we need to get the combination of the needed software running on the a up-to-date [01/01/2014] Ubuntu 12.04 LTS.

You need a working copy of VMWare Workstation 9. I won’t explain how to install this software because there’s already enough documentation provided.

To get GNS3 and dynamips you can simply type at a terminal:

sudo apt-get install gns3 dynamips

To install a qemu version that works with the setup I used the following commands:

cd /tmp

wget -O QEMU-0.11.0-GNS3-Ubuntu-Linux.tgz http://sourceforge.net/projects/gns-3/files/Qemu/Linux/QEMU-0.11.0-GNS3-Ubuntu-Linux.tgz/download

tar xvf QEMU-0.11.0-GNS3-Ubuntu-Linux.tgz

cd QEMU-0.11.0-GNS3-Ubuntu-Linux/

sudo ./Qinstall

To install pemu you need to download it here:
http://sourceforge.net/projects/gns-3/files/Pemu/2008-03-03/pemu_2008-03-03_bin.tar.bz2/download
Then unpack:

bunzip pemu_2008-03-03_bin.tar.bz2

tar xvf pemu_2008-03-03_bin.tar

cd /pemu_2008-03-03_bin

Then you need to copy all the files included to the following directory:

cp * /usr/share/gns3

Yet to get qemu/pemu running on the x64 architecture you need to install certain 32bit libraries.

sudo apt-get install ia32-libs

After you’ve done all this you will be able to run PIX and ASM (and possibly Juniper) images in GNS3.

To make it all work you’ll need some IOS/PIX images. Google is your friend.

In the next post I am going to show you how to setup a basic DMZ network for pentesting purposes.

Advertisements

One response to “Building a virtual network lab for pentesting with GNS3, dynamips, qemu/pemu and VMWare Workstation9

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s