Part 2: Create a Complete Virtual Environment for Penetration Testing

March 15, 2016 | Views: 18896

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Install Windows Server 2012 on Virtual Box



Hello, everyone. In this tutorial we’ll go through the steps of installing Windows 2012 server on virtualbox and connect it to Pfsense.

Tutorial Requirements:

  • Virtualbox


Tutorial Guidelines:

  • Creating a new virtual  machine and setting up its settings

  • Installing Windows Server 2012

  • Configuring the settings of the Server

  • Install Virtualbox Guest Additions (for installing .Net Framework)

  • Configuring the Network of the Server

  • Testing the Server connection to PFsense


Let’s  Begin!!!

Step 1: Creating a New Virtual  Machine












  • For the settings, set up the adapter in the Network tab on Internal Network. Later, it can connect back to the Pfsense.


  • In the Storage section, choose the Server ISO



Step 2:  Installing Windows Server 2012

  • Start the virtual machine; it should take you to the Installation screen


  • Accept the license terms


  • Choose Custom install Windows Only (Advanced)


– Choose Drive 0 Unallocated Space and Click Next


  • Create Admin password


– Click Finish to finish Installation process

– Once the System is installed, log in to the server by going to:

Input >>>> Keyboard >>>> insert Ctrl + Alt+Delete  OR   use a keyboard shortcut

Ctrl + Del





Step 3: Configure the Settings on the Server

  • When you log into the system, a configuration window will appear to set up the essentials of the server.

  • Click Next for Configure Windows Server


  • Type the name of your server and company. For the purpose of  this tutorial, I chose TestingServer as the name of my server. You can name yours whatever you want.

  • Click Next


  • For Creating Network Administrator Account, type the admin password

  • Click Next


  • Choose Use recommended settings

  • Click Configure to start configuring the server


NOTE: It would take 5 to 15 minutes to set up and prepare the server. After it’s done, it’s going to reboot by itself to install the updates.



Step 4: Install Virtualbox Guest Additions

  • To Install other tools like .Net Framework, we have to install Virtualbox Guest addition

  • Go to Device >>>> Insert Guest Additions CD image


  •  Click on the blue box
  • Click on Run the Guest Additions


  • Click Yes


  • Click NEXT, NEXT and Install


  • Click Install, when it asks for Installing Oracle Corporation System Devices


  • Click Finish


Step 5: Configure the Network Settings of the Server

  • Once it’s done rebooting, log in again and go to Server Manager


  • Now, we’re going to configure a static IP for our server:

  • Go to Local Server >>>>> Click on Ethernet >>>> IPV4 address


  • Right-click on Properties


  •  Click on Internet Protocol Version 4 >>> then properties


  •  Set up a static IP address


For this tutorial, I decided to have as my server IP address. The default gateway IP is the same IP address of the Pfsense (our router) that we have configured in Part-1.

For the DNS Server, set it up as your router IP address to get Internet Connection later. In this case, mine is

  • Click OK and you’re done.



  • After configuring the Static IP Address, we move to installing .Net Framework

  • Go to the Dashboard >>> Add roles and features


  • Click Next  For Installation Type

  • Click Next for Server Selection

  • Click Next for Server Roles

  • When you get to Features section, choose .Net Framework Features and click Next


  • Click Install. It will take sometime (few minutes).



Step 6: Testing the Connection to PFsense:

  • To test the connection between the server and the Pfsense, open the PFsense box first. Then, go to Server Powershell and try to ping Pfsense IP. By this stage, you should get a reply that indicates Pfsense is up and running.


  • Also Ping to check the internet is working properly on your box. By following steps, you should be able to get a reply successfully.


NOTES (issues you might face):

  • Don’t forget to open the Pfsense box first to get connection back to the Server.

  • If you could not get internet connection to your box after following the above steps, reset the machine (sometimes the virtualbox gets stuck and needs a reset to work properly).



  • Or thge DNS Server is not set up as your ROUTER IP


That’s all for this tutorial, hope you all find it useful. In the next tutorial will go through configuring Mac OS X (Yosemite) and add it to our Virtual Network Lab .


Create a Complete Virtual Environment for Penetration Testing – Part 1

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

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. Hello,

    I am having problems with the second part of part 5. Add roles and features. I hope someone will be able to help me out!
    I keep on receiving the following message: “The request to add or remove features on the specified server failed. Installation of one or more roles, role services, or features failed. The source files could not be found. Use the “Source” option to specify […] Error:0x800f081f” There is more to it, but I think you will understand which error I am getting.
    I have tried specifying a path. It gives a recommendation for it, but it does not work. After some investigation, I found that my actual SxS path is C:\Windows\WinSxS …. But even then it does not work.
    I have tried to get it through the shell, no luck there either. I am really not sure what I am doing wrong. I have tried deleting and reinstalling it. Changing the network back to NAT. Looking for updates. Nothing seems to work.
    Otherwise, great tutorial! I’m really excited about it!

  2. Lots of server set steps missing. ADDS isn’t native on 2012 fresh install anymore. I could give you a more seamless process if you’d like.

Page 4 of 4«1234
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.

Support Cybrary

Donate Here to Get This Month's Donor Badge


We recommend always using caution when following any link

Are you sure you want to continue?