Tutorial: Setting up a Virtual Pentesting Lab at Home

September 21, 2015 | Views: 85106

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

 

Hi Pentesters,

While pursuing the course on Ethical Hacking and Penetration Testing, we often feel the need to have our own pentesting lab to practice all the stuff we’re learning during the course. I am no exception, so I began searching for a way I could do this. After gathering some info, I found a way and wanted to share it with you.

 

Prerequisites:

  1. A Windows or Linux host machine. In this tutorial, I’m using Windows 10 as the host.
  2. Minimum of 8 GB RAM (recommended).
  3. Virtualization enabled in your BIOS – look for vt-d and enable it.
  4. Check you system and OS architecture (whether it’s 32-bit or 64-bit) and download VirtualBox and Kali ISO according to that architecture.
  5. VirtualBox installed. It’s free, open source and safe. Download it here:
    https://www.virtualbox.org/wiki/Downloads
  6. Kali Linux 2.0 ISO image. Get it here: https://www.kali.org/downloads/
    Note: You can use any OS ISO image file of your choice.
  7. A few Networking basics.

 

Let’s start…
Step 1: Open VirtualBox

 

Step 2: Select File>Preferences>Network>Host-only Network Tab. Check that you have “VirtualBox Host-Only Ethernet Adapter” – present or not. If not, create one by clicking the plus sign on the right side. VirtualBox Host-Only Adapter emulates the functionality of a physical Ethernet switch. Virtual machines can talk to each other and the host, as if they were connected.

 

Step 3: Select VirtualBox Host-Only Adapter and Click settings.

 

Check out the default settings below. You can change it if you want. I won’t.

 

Check the DHCP server tab and it’s default settings. Make sure it’s enabled.

 

Step 4: Create a Virtual Machine by clicking New on the VirtualBox welcome window.
Select Type = Linux, Version = Other Linux (64-bit)/Other Linux (32-bit), depending on your ISO. I’m mounting Kali on it, so I’m typing Name = Kali Guest 01. Click on Next.

 

Step 5: Set Memory size of 2 GB or 3 GB. I’m setting 3GB. Click Next.

 

Step 6: Create a virtual hard disk now and click Create.

 

Step 7: Choose VDI. Click Next.

 

Step 8: Select Dynamically allocated for Storage on Physical hard disk. Click Next.
Step 9: Keep the Defaults on File Location and size Window and click Create.

 

Step 10: You’ll see this screen. Select the Virtual machine and click Settings.

 

Step 11: Select Network section on the Settings Window and the Adapter 1 tab. Enable it if it’s not and Select Attached to = Host-only Adapter. Select Name = VirtualBox Host-Only Ethernet Adapter. Keep the defaults for the rest. Click the refresh button beside the MAC Address Textbox several times making sure it produced a unique MAC Address. Also, make sure the cable connected check box is enabled.

 

Step 12: Click the Adapter 2 Tab and Check the Enable Network Adapter Check box. Select
Select Attached To = NAT to connect to the internet through your host machine.

 

Step 13: You can also share some folders later.
Step 14. Go to the Storage section and right-click on the default .vdi entry and click Remove attachment. Then, select the entry called “Empty”. Next, go to Attributes and click on the CD icon. Select Choose Virtual Optical Disk File and select Kali image for sake of this tutorial.

 

Click Open and it will look like this. Click OK.

 

Step 15: Go to Display and select at least 48 MB of Video memory, which will be enough.

 

Step 16: Everything else is fine. Next, clone the Virtual machine. Yes, just clone it – with a different name, of course.

 

Step 17: Give the machine name “Kali Guest 02” and DON’T FORGET to check the Reinitialize the MAC address of all network cards. Click Next.

 

Step 18. Choose Full Clone and click Clone.

 

Step 19: It will look like this.

 

Start both machines by selecting Live at the Boot menu.

 

Here’s a screen shot of Kali Guest 01 and the ifconfig command fired.

 

For the second one, check the IP’s are different because we have enabled the DHCP server previously.

 

Step 21: Ping each other and ping the internet servers.


 

Ping from the host machine. I wasn’t gonna show the pinging of Host from virtual machine – everyone is Hacker here. LOL.

Scan another virtual machine with Sparta.

 

That’s how you can set up a Virtual Penetration Testing Lab in your home. See you, Peace.

Share with Friends
FacebookTwitterGoogle+LinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterGoogle+LinkedInEmail
Ready to share your knowledge and expertise?
50 Comments
  1. I remember when I started in this field, this was the first step everyone one of us had to do !
    I like this blog series, though I am a bit of a book fanatic ! Do you guys plan on releasing these tutorials as books ? These few precious ones helped me a lot :
    amazon.com/dp/B01MTDLGQQ
    https://www.amazon.com/dp/0131481045

    cheers

Page 9 of 9« First...«56789
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