Setting up Kali Linux in a virtual machine: Configuring the toolbox for future audits of your own environment: up to date, protected by snapshots, and ideally with its own network adapter

 · 13 min read
Contents10 sections
SeriesCybersecurity homework against AI attackers Part 2 of 2
  1. 1Offensive AI agents (Agentic Offensive Frameworks) such as ARTEX
  2. 2Setting up Kali Linux in a virtual machine

Part 1 of this series sets out homework assignments against AI attackers such as Agentic Offensive Frameworks (AOFs). Where useful and necessary, they include testing your own environment with the same tools attackers use. Some of these tests are best run not on your work computer but in a virtual machine (VM) with Kali Linux. Kali has many pentest tools preinstalled; the VM is isolated from your work computer (the host), and you can roll it back with snapshots.

As of December 2026, with Kali 2026.3 and VMware Workstation Pro 26H1u1. This post outlines how to set up Kali in VMware Workstation Pro on Windows, plus brief notes on Linux machines and Macs with Apple silicon. By the end, you’ll have an up-to-date VM with snapshots and internet access, ready for your first self-audits with Linux tools.

What you need#

Besides the VMware Workstation Pro hypervisor, you need:

  • Virtualization in the firmware: Intel VT-x or AMD-V has to be enabled in the computer’s BIOS or UEFI; without it, no 64-bit VM will start.
  • Memory: at least 4 GB for the VM, ideally 8 GB if the computer has 16 GB or more.
  • Disk space: about 40 GB free; that’s enough for the update, snapshots, and the self-audits in this series. The archive and the extracted VM take up about 20 GB of that.
  • Internet access: for the download and later from inside the VM for updates.
  • A Broadcom account: the only way to download VMware.
  • On a company computer: permission from IT to install a hypervisor and connect a USB network adapter.

On a Mac with Apple silicon, you install Kali differently; see Mac with Apple silicon.

Get VMware Workstation Pro#

VMware Workstation Pro has been free for personal use for some time, and since November 11, 2024, it has been free for businesses too. The free version doesn’t need a license key. Version 26H1u1, which this post describes, came out on September 3, 2026. Newer versions should work just as well.

To download it, you need an account on Broadcom’s support portal. After you register, Broadcom screens your account for export restrictions, and that can take several weeks in some cases. So register early and use your real details; according to Broadcom, made-up details will probably fail the screening and delay approval.

For Linux machines, Workstation Pro comes as an installer with the .bundle extension; it’s also on the support portal.

Download, verify, and extract Kali#

On the Kali download page, choose “Virtual Machines” and then the image for VMware, a 7z archive of about 3.6 GB. Kali 2026.3 came out on October 26, 2026.

The “sum” button next to the download reveals the archive’s SHA-256 checksum. Before you extract anything, compare it with the checksum of the file you downloaded. Kali redirects downloads to mirror servers, and only the checksum from kali.org shows that the archive arrived complete and unaltered. In the commands in this section, an asterisk (*) stands in for the version number; leave it as it is. That way, the commands also work for later Kali versions, as long as there’s only one Kali archive in the folder.

On Windows, PowerShell does the comparison for you if you run these two lines in the download folder. Paste the checksum from kali.org into the first line; the one shown here is for Kali 2026.3:

PowerShellCompare the checksum on Windows
$expected = 'f7a008dfc78de660f8e98b8cbbf94c36688e5441bf53d6c32643f0573177a096'
(Get-FileHash .\kali-linux-*-vmware-amd64.7z -Algorithm SHA256).Hash -eq $expected
Output
True

True means the two checksums match. Get-FileHash returns the checksum in uppercase, but that doesn’t affect the comparison, because -eq is case-insensitive.

On Linux:

BashCompute the checksum on Linux
sha256sum kali-linux-*-vmware-amd64.7z
Output
f7a008dfc78de660f8e98b8cbbf94c36688e5441bf53d6c32643f0573177a096  kali-linux-2026.3-vmware-amd64.7z

If PowerShell returns False, first check that line 1 contains the checksum for your Kali version rather than the one for 2026.3 printed here. If the checksum still doesn’t match the one on kali.org, the download is incomplete, corrupted, or tampered with. Download the archive again and don’t continue until the checksums match.

Ideally, extract the archive straight into the folder where the VM will live for good; Workstation Pro runs it from there. On Windows, use 7-Zip; Windows 11 hides 7-Zip’s context menu entry behind “Show more options.” On Linux, move the archive into that folder first and extract it there:

BashExtract the archive
7z x kali-linux-*-vmware-amd64.7z
Output
[…]
Extracting archive: kali-linux-2026.3-vmware-amd64.7z
[…]
Everything is Ok

Folders: 1
Files: 43
Size:       16665417410
Compressed: 3876027244

The result is a folder such as kali-linux-2026.3-vmware-amd64.vmwarevm that holds the configuration file (.vmx) and the virtual disk, split into just over 40 files. You can delete the archive once the VM is running.

Antivirus software may classify the VM as potentially harmful because it contains exploits, payloads, and similar files. OffSec, which maintains Kali, says this is to be expected and that you can exclude the VM’s folder from scans if you want. On a work computer, clear that exclusion with your IT department.

Open and configure the VM#

Kali deliberately ships its images with an old hardware profile (Workstation 8.x) so that they run out of the box for as many users as possible. In Workstation Pro, click the “Open a Virtual Machine” button on the “Home” tab and select the .vmx file in the extracted folder. Adjust the settings before the first boot. The image comes with 2 GB of memory, four processor cores, Network Address Translation (NAT) for networking, and only a USB 2.0 controller (see Figure 1).

Figure The freshly opened Kali VM with an old hardware profile, 2 GB of memory, and NAT. The screenshot shows an older interface (Workstation on Linux, Kali 2022.2); the values are the same for the 2026.3 image. Image: Kali documentation (OffSec), licensed under GPLv3. Source Figure, Full size
VMware Workstation with the imported Kali VM powered off: on the left the actions Start up this guest operating system, Edit virtual machine settings, and Upgrade this virtual machine, below them Memory 2 GB, Processors 4, Hard Disk 80 GB, Network Adapter NAT, USB Controller Present; at the bottom right Hardware compatibility: Workstation 8.x virtual machine

The VM has to be powered off for the following steps; you’ll find steps 2 through 6 under “Edit virtual machine settings”:

  1. Hardware version: If VMware shows “Upgrade this virtual machine,” click it and select the “Alter this virtual machine” option in the wizard rather than creating a clone. This brings the VM up to the current hardware version and unlocks newer graphics options. Afterward, the VM details no longer show “Hardware compatibility: Workstation 8.x virtual machine.”
  2. Memory: at least 4 GB, ideally 8 GB if the computer has 16 GB or more.
  3. Processors: two to four cores; the image comes with four.
  4. Display (only if the desktop is sluggish): Select the “Accelerate 3D graphics” checkbox and increase the graphics memory a little; it comes out of the VM’s memory. The Kali documentation advises against turning on 3D, though, because users have reported problems with it.
  5. USB Controller: In the “USB compatibility” list, select the highest USB 3 setting, “USB 3.1” or “USB 3.2,” depending on the version. The USB network adapter for tests on the corporate network needs this (see Network).
  6. Advanced (only if Hyper-V is active; see below): Go to the “Options” tab, select “Advanced,” and then select the “Disable Side Channel Mitigations for Hyper-V enabled hosts” checkbox.

The setting in step 6 matters only on Windows computers with Hyper-V active; there, it makes the VM run noticeably more smoothly. Hyper-V is on, for example, when “Memory integrity” is turned on under “Core isolation.” Workstation Pro then runs its VMs through the Windows Hypervisor Platform, and according to Broadcom, mitigations against side-channel attacks such as Spectre can slow the VM down. The option turns these mitigations off. For a local test VM, that’s acceptable.

In VirtualBox, you set memory and processors the same way, under “System.”

Now take a snapshot of the fresh VM from the “VM → Snapshot → Take Snapshot” menu. If something goes wrong during a self-audit, you can roll back to it instead of setting up the VM all over again.

First boot#

Start the VM. If VMware asks whether you moved or copied the VM, click the “I Copied It” button; OffSec recommends the same. Then log in with username kali and password kali. The keyboard is still set to US at this point; on a French AZERTY keyboard, for example, press Q to type the a in kali.

If your keyboard doesn’t use the US layout, switch Kali to yours now. To switch to French, for example:

  1. Open the Kali menu at the top left and search for “Keyboard.” On AZERTY, type just key: K, E, and Y sit where they do on a US keyboard, but A doesn’t.
  2. Open “Keyboard” and go to the “Layout” tab.
  3. Turn off the “Use system defaults” toggle so that you can edit the layouts.
  4. Under “Keyboard layout,” click the “Add” button and add your layout, such as “French.”
  5. Select “English (US)” and click the “Remove” button, so that your layout is the only one left.

The change takes effect immediately.

Then open a terminal and change the password:

BashChange the password
passwd

New Kali images come out only once a quarter, so update the system before every self-audit. full-upgrade may also remove or install packages in the process:

BashUpdate Kali without prompts
sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt full-upgrade -y

With these options, the update runs without stopping to ask questions.

Once the update has finished, restart the VM.

Python tools and dependency cooldowns#

Tools that don’t ship with Kali often come from PyPI, the Python Package Index. To install them, use pipx, which puts each program in its own virtual environment. Install uv, Astral’s Python package manager, with pipx as well:

BashInstall pipx and uv
sudo apt update && sudo apt-get install -y git python3-venv python3-pip pipx
pipx ensurepath && source ~/.profile
pipx install uv

For each program, pipx creates links to its commands in ~/.local/bin. pipx ensurepath adds that directory to the PATH in your shell’s startup file, and source ~/.profile adds it to the PATH of the terminal that’s already open. At the end, pipx reports:

Output
  installed package uv 0.13.12, installed using Python 3.14.10
  These apps are now available
    - uv
    - uvx

A dependency cooldown makes package managers skip versions that are less than a set number of days old. In supply chain attacks, attackers usually publish a malicious version with a stolen publishing token or a hijacked maintainer account, and the registry typically removes it within hours or days. In eight of the ten well-known attacks that William Woodruff analyzed in November 2025, the malicious version was available for less than a week. A seven-day cooldown would have blocked most of them. According to cooldowns.dev, cooldowns don’t help against typosquatting, against attackers who build trust over months, as with xz-utils, or against vulnerabilities in packages you’ve already installed.

The cooldowns.sh script sets the cooldown for most of the common package managers. It has no dependencies; download it and make it executable:

BashInstall cooldowns.sh
sudo curl -fsSL -o /usr/local/bin/cooldowns.sh https://raw.githubusercontent.com/mprpic/cooldowns/main/cooldowns.sh
sudo chmod +x /usr/local/bin/cooldowns.sh

Before you run it, you can read through it with less /usr/local/bin/cooldowns.sh. Then set a seven-day cooldown for each package manager:

BashSet a seven-day cooldown
for pm in pip uv poetry pdm npm pnpm yarn bun deno cargo bundler; do cooldowns.sh set "$pm" 7d; done

For most package managers that aren’t installed, the script prints not installed, skipping. For pip, uv, Yarn, and Bundler, it writes environment variables to ~/.zshrc; for npm, it adds an entry to ~/.npmrc, and for Bun, to ~/.config/.bunfig.toml. Then check the settings:

BashCheck the cooldowns
cooldowns.sh check
Output
Checking dependency cooldown configurations...

  ok      pip      PIP_UPLOADED_PRIOR_TO='P7D' (7-day cooldown) in /home/kali/.zshrc (not yet sourced)
  ok      uv       UV_EXCLUDE_NEWER="7 days" in /home/kali/.zshrc (not yet sourced)
  ok      npm      min-release-age=7 in /home/kali/.npmrc
  ok      yarn     YARN_NPM_MINIMAL_AGE_GATE=10080 (7d) in /home/kali/.zshrc (not yet sourced)
  ok      bundler  BUNDLE_COOLDOWN=7 (7d) in /home/kali/.zshrc (not yet sourced)
  WARN    nuget    .NET SDK 6.0.400 has no cooldown support (needs >= 11.0.100)

5 configured, 1 warnings, 0 not configured

ok means the cooldown is in place. If a line ends with (not yet sourced), the cooldown takes effect only in a new terminal. MISS flags a package manager without a cooldown; run cooldowns.sh set <package manager> 7d for it again. WARN flags a package manager version that doesn’t support cooldowns yet, here NuGet in .NET SDK 6.0.400. Bun doesn’t appear in the output because cooldowns.sh check doesn’t look in ~/.config/.bunfig.toml.

If everything works, shut Kali down and take the second snapshot. The self-audits in later parts that use Linux tools start from this snapshot.

Network#

With NAT, the VM reaches the internet and the local network without taking up an extra IP address on that network. NAT is all you need for updates and for looking at your environment from the outside in part 3.

For tests on the corporate network, I recommend a USB network adapter that you pass straight through to the VM. “Bridged” mode would also give the VM its own addresses, but its traffic would run through the work computer’s network card. Passing an adapter through has two advantages:

  • Your work computer isn’t on the network under test. Its endpoint detection and response (EDR) agent, VPN client, and firewall don’t skew the results.
  • Switching networks is quick. A different network is just a different cable.

When you buy an adapter, look for the ASIX AX88179 chip (USB 3.0, gigabit). The Kali kernel supports it with the ax88179_178a driver. Adapters with other chips aren’t guaranteed to work smoothly on Linux, although the kernel also ships r8152 for adapters with a Realtek RTL8153.

With the VM running, pass the plugged-in adapter through from the VMware Workstation menu: “VM → Removable Devices → (adapter name) → Connect (Disconnect from Host).” The work computer then hands the adapter over to the VM, and in Kali, ip link lists it as an additional network interface.

Plug in the network cable only after the adapter is connected to the VM, and unplug the cable before you shut down the VM. Whenever the adapter isn’t connected to the VM, for example while the VM is off, the work computer takes it back. Before testing, also disconnect the VM’s NAT adapter or use ip route to check that the traffic goes through the USB adapter.

Mac with Apple silicon#

On a Mac with Apple silicon, use VMware Fusion Pro instead of Workstation Pro; Fusion is also free and requires a Broadcom account. There’s no prebuilt Kali image for VMware on these machines: Kali offers its VM images only for amd64, and on Apple silicon, Fusion runs only ARM64 systems. Instead, install Kali yourself as the Kali documentation describes. On the download page, choose the “Apple Silicon (ARM64)” variant under “Installer Images,” and drag the ISO file into the Fusion window. As the guest operating system, choose “Debian 12.x 64-bit Arm.”

Coming up in part 3#

Part 3 tackles the first homework item from part 1: using open source intelligence (OSINT) to find out what attack surface your own environment exposes to the internet (external attack surface monitoring, or EASM). The remaining parts will follow about once a week, and part 1 will link to each of them.

Further reading#

Read these first:

To watch:

On specific steps: