← Back to all lessons

01 / Foundations / 35 min READ + PRACTICE

Install Kali Linux in a virtual machine.

Download a verified Kali image, create a VirtualBox VM, update it, and take a clean snapshot.

Practice boundaryUse your own devices, your isolated practice VM or 127.0.0.1. Get explicit authorization for any other system.

1. Get the official image

Install a current hypervisor such as VirtualBox. Visit kali.org/get-kali and choose the Virtual Machines image for your CPU, or the Installer ISO if you prefer the setup wizard. Download its published SHA256 checksum and compare it locally. Never use a random mirror or unofficial prebuilt image.

LAB TERMINAL / EXAMPLE
sha256sum kali-linux-*.7z
# Compare the digest with the checksum published by kali.org

2. Create the VM

For an installer ISO, create a Linux/Debian 64-bit VM with roughly 2–4 GB RAM, two CPU cores and a dynamically allocated disk of at least 30 GB. Attach the official ISO and follow the graphical installer to create a non-root user. For a prebuilt VM, import the downloaded image following the Kali guide. Enable virtualization in firmware if the hypervisor cannot start the VM.

3. Isolate, update, snapshot

Use NAT while downloading updates. Switch to host-only networking for lab traffic; keep intentionally vulnerable VMs off bridged networking. Update Kali, install Python tooling, then take a clean VM snapshot before experimentation. Do not run day-to-day Python projects with sudo.

LAB TERMINAL / EXAMPLE
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y python3 python3-venv git curl wireshark
python3 -m venv ~/security-lab/.venv
source ~/security-lab/.venv/bin/activate
python -m pip --version

Official setup guides

Kali downloads: https://www.kali.org/get-kali/ ; VirtualBox guest installation: https://www.kali.org/docs/virtualization/install-virtualbox-guest-vm/ ; installation reference: https://www.kali.org/docs/installation/.

HANDS-ON EXERCISE

Try it in your lab

Take a snapshot named clean-kali, run python3 --version, and record the VM network mode and virtual IP in your journal.

CHECKPOINT

Make sure it clicks

What does a SHA256 comparison verify, and why should a deliberately vulnerable VM use host-only networking?

TRY WITH OPENCODE

A prompt you can adapt

Review my Kali VM installation checklist for missing verification, isolation, Python virtual environment and rollback steps. Do not run commands on my behalf.
How to set up OpenCode ↗
Your progress stays in this browser only.