Part 1: Create a Complete Virtual Environment for Penetration Testing

March 14, 2016 | Views: 54547

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Creating a lab for testing is one of the important aspects of becoming a professional pentester (E-Hacker). I was creating a new Virtual Lab for my new System and thought it would be beneficial to share the steps here in the Cybrary community.

The tutorial series will have 6 parts, which will include setting up multiple virtual boxes for different OS systems and connecting them using PFsense (routing software).

The tutorial series will include:

1- Configuring Pfsense for the routing and firewall

2- Windows R2012 server

3- Ubuntu

4- Mac OS X(Yosimite)

5- Windows 10

6- Windows 8

Let’s start!!!

1- Configuring Pfsense for the routing and firewall

Requirements:

– Virtualbox

– Pfsense ISO

– Winrar or 7-zip (extraction)

Pfsense is a free software that provides the routing and firewall inside the virtual machine.

Link: https://www.pfsense.org/download/?section=downloads

Tutorial guidelines:

– Downloading

– Extracting the ISO

– Installing Pfsense on the  (Virtualbox Machine)

– Configuring the settings

1- Downloading the Software

– Choose Install 2.2.6 (version)

ps1.JPG.c2bb95a536dbc1ade404b4b17f19d930

-Select i386 (32-bit) from the drop-down menu of Computer Architecture

ps2.png.a2ab45d148cc5a3ef9b2dce11fb91247

– Choose the platform as (Live CD with Installer)

ps3.png.634363adc7320a66bc535768524a6e26

– Choose one of the mirrored images. For this tutorial, I chose the hosting by NYI.

ps4.thumb.png.773f38fae947cf807ce6b8200e

NOTE: The file will be in the format of iso.gz (Linux compression format)

2- Extracting the ISO:

There are multiple extraction tools that can be used to the extract (gz) compressed files. I usually use winrar, as it’s a very common compressor utility for Windows.

Examples: Winrar, zip, 7-zip

3-  Installing Pfsense on the virtual machine :

– Create a virtual machine for the PfSense

pf5.JPG.46610e7c2a090ec47a96447104397274pf6.JPG.9efc9dd9825a83f9215b015cd601b781pf7.JPG.373cd05414463e77b323351fff08e210pf8.JPG.fb65c0469a2ad7432fddafc206fee331pf9.JPG.6b761db5f7a7c50b640fdb99aecc7889

– For the machine settings, there are not many to configure for the Pfsense box. The main focus is on adding two adapters to our machine – one is bridged and other is internal.

ps8.JPG.2a1d0fbd49da12960f71e2172ac603e6ps11.JPG.95b2930260e59be329c5f3f3b149319ps12.JPG.1d2255dff6d0bf1998991ba64d1669fps9.JPG.127f9269d1db235297093d8004a8f7c6

4- Configuring the settings

– Start the virtual a machine, and wait for it to load. It will take a minute or two to direct you to the main menu.

load.JPG.e6b205f7b4937c57a68ca3d71a19d9a

– Once the main menu is loaded, type 99 to move to the (Configuration Console)

load4.JPG.2c10f37bf9274c9e8674ecda6b2651

–  Choose (Accept these settings) option and click enter

load6.JPG.fc4d03452cf8f4c0f56e3c488cce3d

– Choose Quick and Easy Install and click enter

load7.JPG.c88526333380da20f566a49d1ee8d1

– Choose Ok and click enter

load8.JPG.ffac509e9d7effeb85e0671d9d6307

– It will take a little time to finish the installation – about 2-3 minutes

load9.JPG.646a65cc7b80445d7d8941d6c76113

– In the install Kernel step, choose Standard Kernel and click enter

load10.JPG.53c9ca2caecc3b03cbd11d8ec17d3

– Click on Reboot

load12.JPG.c9fb65207975fdc7aa1adf46e43ad

NOTE: When rebooting, remove the CD drive quickly, otherwise it’s going to load back to the installation menu and you’ll have to do the steps again.

– To remove the CD, click on device and remove the disk from the virtual box

load15.thumb.png.def77d4018e62d1150c4780

– After the reboot, it should take you to the main menu again. This time, you should see the WAN address set up and ready to go. However, we still need to setup the LAN IP address. To do so, type number 2 from the menu (Assign Interfaces)

– Then type (2) to choose LAN interface

For the LAN IPV4, I choose 10.0.0.1 as the Pfsesne IP

Enter 24 for (new LAN IPV4 subnet bit count), as shown below

p44.JPG.5178162bef2ceabec900e63f39d01f06

– Hit ENTER for the next step

– Hit another ENTER for (new LAN IPV6 )

– Type (y) for the question “Do you want to enabe the DHCP server on LAN ?”

– Enter the start address: 10.0.0.5

– Enter the end address: 10.0.0.15

– Type “Y” again to setup webconfigurator

p45.JPG.e501bbc65a0033bcc8358ebfbcd7656e

– Login in to the PFsense  page

Open another Virtualbox machine to access the router page. The virtual machine has to be set on Internal Network (Adapater) to communicate through the Pfsense firewall.

I used a Windows 10 virtual machine.

Go to the browser and type the link that you’ve given after configuring the PFsense. In this case, it is http://10.0.0.1/

You’ll be greeted with the login page of PFsense

win1.JPG.bfe2d2589c7c9b72530fd304056bf20

Username: admin

password: pfsense

The wizard will start setting up the environment

For the primary DNS IP, type the IP address of your router, NOT the PFSENSE address. It’s: 192.168.1.1 – in order to get Internet connection to your box.

39.JPG

– Click next multiple times, then Reload. (You don’t need to change anything else.

– Once you get to the dashboard, you should have the settings set up similar to the below picture

dash.JPG.5e00892cc77aa7b5bee49544b3cb1a6

NOTES:

Important things to look for in the pfsense configuration:

  • LAN IP is the same IP address of the pfsense
  • Primary DNS server IP should be your router IP
  • For testing, Ping 10.0.0.1 OR goog.com (YOU should be able to get reply by this point)

That’s all for this tutorial.

Any comments or suggestions on how to make better tutorials or topics you’d like me to cover are welcome.


@Z33Max

Part 2: Create a Complete Virtual Environment for Penetration Testing

Part 3: Create a Complete Virtual Environment for Penetration Testing

Part 4: Create a Complete Virtual Environment for Penetration Testing

Part 5: Create a Complete Virtual Environment for Penetration Testing

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
66 Comments
  1. Great Tut!

  2. This is a great tutorial! The amount of detail is perfect and very helpful.

  3. Great tutorial

  4. Great Job! I liked the whole series.

Page 11 of 11« First...«7891011
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play
 

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel