How to Setup A Virtual Penetration Testing Lab.The most apparent reason you would need a penetration testing lab is to practice what you learn and test the different available security tools. However, other than convenience, there are more reasons as to why you need a virtual lab. 1. Your safetyOne is for your safety. Performing a penetration test on a system without permission from the owner is illegal and regarded as a computer crime. To avoid such problems and be on the safe side, you can host the various vulnerable machines available in your penetration testing lab and exploit them. 2. It’s isolated from the real-world environmentThis is another reason why a penetration testing lab is necessary. Anything you perform in the lab does not affect the systems or people around you. For example, if you are trying to get into malware analysis, you will deal with real viruses. This virus will be isolated with a virtual testing lab and can only impact the installed virtual machine, whichs is much more manageable. 3. It’s a reliable testing platformFinally, a virtual penetration testing lab is flexible and will provide you with a reliable platform for research and development. You can develop new security tools, advanced exploitation tactics in a controlled environment without affecting any systems or networks around you. Understanding Virtualization TechnologyWhen setting up a penetration testing lab, you will have two options to choose from:
The latter (home lab) can be a little expensive and complicated to set up and manage. You will need to gather all computer devices and routers and use them to set up a lab. For example, you can have Computer A running your hacking distribution (say Kali Linux) and Computer B or C running your vulnerable machines (say, DVWA or BWAPP). You will also need routers, switches, ethernet cables to manage the personal network. Locally-hosted virtualization is much easier to set up, manage and only requires you to have one powerful PC that supports virtualization technology. That is the method that we will use in this post. Essentially, virtualization allows you to run more than one operating system on your computer. You will need to install virtualization software and use it to run the additional operating systems to get started. Some of the most common softwares are VirtualBox and VMware. VirtualBox is a free and open-source virtualization software developed by Oracle distributed under the GNU General Public License (GPL) version 2. VMware , on the other hand, is a commercial software company and has several products to offer. The only free version is the VMware Workstation Player intended for home or personal use. To get many more advanced features, including snapshots, you will need to upgrade to VMware Workstation pro. Up to this point, I believe you have a good understanding of a penetration testing lab and the technology you need to come up with one. Let’s dive in and set up our lab. Our virtualization software of choice for this post is VirtualBox. Step 1. Download and Install VirtualBox on your PCTo get started, you will need to install VirtualBox on your current operating system. That can be Windows, Linux, or macOS. Additionally, install the VirtualBox guest Addition , which consists of drivers and system applications that improve the performance of your virtual machines. Other advantages of guest additions include:
After a successful install, proceed to launch the virtual box from the application menu. Step 2. Install Kali Linux on VirtualBoxOnce you have VirtualBox installed and running, we can start installing our virtual machines. We will begin by installing the penetration testing distribution of our choice. In this post, we will use Kali Linux. However, that should not limit you from using other security operating systems like BlackArch Linux, Parrot, etc. To install Kali Linux virtual machine, we will not need to download the setup ISO file and configure everything from scratch. Nowadays, Kali Linux comes packaged in several formats.
In this post, we will download the Kali Linux virtual machine setup for VirtualBox from the official Kali Linux download page . It is a `.ova` file. After the download is complete, launch VirtualBox from your applications menu and follow the steps below:
After a successful import, you will see Kali Linux listed on your VirtualBox window, as shown in the image below. You can tweak the settings of the virtual machine depending on your system resources. When done, click Start to boot the virtual machine. You don’t need to perform any configurations, just sit and wait till you get to the Kali Linux login screen. The default credentials are:
Step 3. Install Windows 10 on VirtualBoxMicrosoft’s Windows is the most popular operating system used worldwide. As an ethical hacker, you need to understand how to exploit and find vulnerabilities on Windows systems and software. For that case, we will also need to install Windows as a virtual machine – specifically Windows 10. You can download Windows 10 ISO file from Microsoft Official website . Launch VirtualBox and follow the steps below to install Windows 10
That will create a Windows 10 virtual machine, as shown in the image below. To install Windows 10 as a virtual machine, click the Start button on the VirtualBox window. A window will pop up and prompt you to select the Windows 10 ISO file you downloaded. Click Start when done. After a few seconds, you will get to the Windows 10 installation screen. Continue with the installation process like you were installing Windows natively on your PC. When done, you can proceed to install Metasploitable. Step 4. Install MetasploitableMetasploitable is an intentionally vulnerable Linux-based system used to practice penetration testing. Like the Kali Linux virtual machine, Metasploitable comes in a pre-configured virtual machine, making the whole installation easier. Head over to SourceForge and download the Metasploitable VM. After a successful download, launch VirtualBox and follow the steps below:
You should now see Metasploitale virtual machine on your VirtualBox window as shown in the image below: Click Start to launch Metasploitable. This vulnerable machine doesn’t come with a Graphical User Interface (GUI). Therefore, when it’s fully booted, all you will see is a console. Use the following default credentials to log in:
Final ThoughtsThis post has given you a step-by-step guide to setting up a virtual penetration testing guide.
©2022 Campos Entertainment TR. |