Building a Virtual Ethical Hacking Home Lab — Part 4: Attack Machine Setup

Building a Virtual Ethical Hacking Home Lab — Part 4: Attack Machine Setup

An interactive guide for building your very own ethical hacking home lab using VMware

Module Content

1. Download Kali Linux Image

2. Create Kali Linux VM

3. Install Kali Linux

4. Post-Installation Configuration


In this module, we’ll install the Kali Linux VM as our dedicated attack machine.

Unlike the victim VMs from the previous module, which were preconfigured, Kali Linux requires a more detailed setup process.

This involves creating the VM from scratch and configuring it step by step. Given the complexity and time involved, I’ve dedicated an entire module to ensure the process is clear.

Let’s dive in and set up our attack machine!

Download Kali Linux Image

Get Kali from the following link: Download Kali ISO

Download the 64-bit recommended installer. The image is 4 GB in size, so it will take some time to download.

📝 As of writing, the latest version of Kali Linux is 2024.3.

You will have an .iso file saved on your computer after download

Create Kali Linux VM

Launch VMware workstation and click Create a New Virtual Machine

Select Typical (recommended) and click Next

Select Installer disc image file (iso) and click Browse to select the image fine we downloaded earlier.

Select the file and click Open

Click Next

Select Linux as the guest operating system. You can leave the version at Ubuntu

Give the VM a suitable name — here I gave it the name Kali. Browse to the location you want Kali VM to be and click Next.

Increase the disk size to 50 GB and select Store virtual disk as a single file

Select Store virtual disk as a single file.

Click on Finish


Install Kali Linux

Select Kali from the sidebar and click on Power on this virtual machine

From the installer menu, select Graphical install

Select your Language, location and keyboard layout.

Enter a name for the VM. You can use any name here.

📝 The hostname is used to identify the system on the network. The hostname can also be changed after installation.

Leave the Domain name input blank and click Continue

Enter your name.

📝 This is what will be shown on the login screen.

Create a username

📝 The username is used to create the home directory for the user. All the user-related configurations are stored in this folder.

Here, I gave it the name attacker.

Enter a strong password. Re-enter the password in the second field for confirmation and click on Continue.

Select the appropriate clock for your location, then click Continue

Select the drive (sda) and click Continue.

Select Guided — use entire disk and then click Continue.

Select the option: All files in one partition and click on Continue.

Select Finish partitioning and write changes to disk. Then click on Continue.

Select Yes and click Continue

After the base system installation is complete, we need to choose the desktop environment that will be installed. I have selected GNOME for installation.

📝 Speaking of other options, the default is XFCE; it does not look as pretty as GNOME, it is much lighter and should have better performance. KDE Plasma is the fanciest with a lot of bells and whistles. I would only recommend KDE if you can assign 2 cores and 4 GB RAM for this VM.

Once the desktop environment is selected, click on Continue.

The installation will take some time. Select Yes and click Continue.

Select /dev/sda and click Continue

Click Continue to reboot the system.

After reboot, we should see the Login screen.

Click Enter to log in. Enter the password that was configured during the installation.

Login to the Desktop.

Login to the Desktop.


Post-Installation Configuration

Kali Linux installer can detect when it is run from a VM because of this it automatically installs Guest Add-ons.

💡 Press Right Ctrl+F to enter Fullscreen mode. The VM should scale to fill the entire screen. Press Right Ctrl+F again to exit Fullscreen mode.

From the dock at the bottom of the screen. Select the Terminal.

Run the command: ip aWe can see that the Kali VM has been assigned an IP address from NAT network adapter — 192.168.199.130 from the address space 192.168.199.0/24

The VM should be able to access the internet as well.

Run the following command to fully update the system:

sudo apt update && sudo apt upgrade        
⚠️ This may take a while depending on your internet speed

Once the sources have been fetched, we will be asked if we want to continue. Enter Y and then press Enter to start the update.

After the update is complete, run the following command to remove the unused packages:

sudo apt autoremove        
📝 The .iso file that was downloaded to create the VM can be deleted now 🚮 if you do not plan to store it for future use.
⚠️ Sometimes, your Kali Linux machine might show black screen on boot, this issue typically occurs after updating the VM. To fix this, forcefully power it off and start it again. Sometimes, it takes up to three attempts of power off and on again to get the issue fixed.

In the next module, we will start conducting reconnaissance on the victim computers as though we’re preparing to attack a real machine.

If you liked what you just read, consider:

◆ Clapping for the article (you can clap up to 50 times)

◆ Dropping a comment to show your support

◆ Sharing the article with others who will find it useful

◆ Follow me on medium and LinkedIn

◆ If you’re following the setup for this lab and you come across any technical issue, feel free to reach me through WhatsApp.

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics