| name | kali-linux |
| description | Use Kali Linux for authorized penetration testing, security research, and CTF work. Use when a user asks about installing Kali, setting up a pentest lab, picking tools from the Kali toolchain, using Kali in WSL/Docker/VM, or updating the distribution. |
| license | Apache-2.0 |
| compatibility | Kali Linux 2024+, WSL2, Docker, VMware, VirtualBox |
| metadata | {"author":"terminal-skills","version":"1.0.0","category":"devops","tags":["kali-linux","penetration-testing","security","ctf","lab-setup"]} |
Kali Linux
Overview
Kali Linux is a Debian-based distribution maintained by Offensive Security with 600+ preinstalled tools for penetration testing, digital forensics, reverse engineering, and red teaming. Use Kali as a disposable lab environment — VM snapshots, Docker containers, or WSL2 — never as a daily driver. Tools are organized into Kali Metapackages (e.g., kali-tools-top10, kali-tools-wireless, kali-tools-web) so you install only what you need.
Instructions
Step 1: Install Kali
docker run -it --rm kalilinux/kali-rolling
apt update && apt install -y kali-linux-headless
wsl --install -d kali-linux
wsl -d kali-linux
sudo apt update && sudo apt install -y kali-linux-default
Step 2: Update and Install Tool Groups
sudo apt update && sudo apt full-upgrade -y
sudo apt install -y kali-tools-top10
sudo apt install -y kali-tools-web
sudo apt install -y kali-tools-wireless
sudo apt install -y kali-tools-passwords
sudo apt install -y kali-tools-forensics
apt-cache search kali-tools
Step 3: Set Up a Safe Lab Environment
docker run -d --rm -p 80:80 vulnerables/web-dvwa
docker run -d --rm -p 3000:3000 bkimminich/juice-shop
docker run -d --rm -p 8080:8080 citizenstig/nowasp
sudo openvpn ~/lab.ovpn
Step 4: Daily Workflow
VBoxManage snapshot "Kali" take "pre-engagement-$(date +%F)"
mkdir -p ~/cases/acme-2026-04/{recon,exploits,loot,notes,reports}
cd ~/cases/acme-2026-04
script -a notes/session-$(date +%F-%H%M).log
exit
nmap -sV -sC -oA recon/nmap target.example.com
msfconsole -q -r notes/msf-resume.rc
wireshark &
Step 5: Minimize Footprint and Tear Down
sudo apt autoremove --purge -y $(dpkg -l | grep kali-tools- | awk '{print $2}' | grep -v top10)
sudo apt clean
history -c && rm -f ~/.bash_history ~/.zsh_history
VBoxManage snapshot "Kali" restore "pre-engagement-2026-04-11"
Examples
Example 1: Spin Up a Throwaway Kali Container for a CTF
docker run -it --rm \
-v "$PWD/ctf-loot:/root/loot" \
--name ctf \
kalilinux/kali-rolling bash
apt update && apt install -y nmap hydra john sqlmap curl
cd /root/loot
nmap -sV -oA scan 10.10.10.5
Example 2: Prepare Kali for a Web App Assessment
sudo apt update
sudo apt install -y kali-tools-web burpsuite zaproxy
which sqlmap nikto gobuster ffuf wfuzz burpsuite
sudo gunzip /usr/share/wordlists/rockyou.txt.gz
ls /usr/share/wordlists/
Guidelines
- Written authorization first. Using Kali tools against systems you don't own or have explicit permission to test is a crime in most jurisdictions.
- Treat Kali as ephemeral. Use VM snapshots or Docker so you can reset after each engagement.
- Never run Kali as your daily OS. Root-by-default and aggressive tools are a poor fit for general use.
- Use metapackages (
kali-tools-*) instead of cherry-picking — they track dependencies the Kali team already validated.
- Keep the lab network isolated (host-only or internal network) so stray scans can't reach production or the public internet.
- Kali is rolling release —
apt full-upgrade weekly. If it breaks, roll back the snapshot.
/usr/share/wordlists/ has rockyou, seclists, dirb, and more. Install seclists for the full set.
- For client reporting, pair Kali with
faraday or dradis instead of ad-hoc notes.