Kali Linux: A Hands-On Start for Authorized Security Testing
On this page

Kali Linux is the Swiss Army knife of offensive security: a free, Debian-based distribution with several hundred penetration-testing, forensics and security-auditing tools pre-installed and maintained by Offensive Security. If you’ve watched anyone do security testing in a film, they were almost certainly staring at Kali.
But Kali is a tool for a job, and the job has rules. These tools are designed to find and exploit weaknesses in computer systems — which is exactly why running them against anything you don’t own or have written permission to test can be a crime, full stop. A scanner pointed at your own lab is education. The same scanner pointed at a company you don’t have a contract with is an offence in most of the world. So this guide does two things at once: it gets you productive on Kali, and it keeps every single example inside a lab you build yourself. Learn the craft; stay on the right side of it.
The one rule that matters: only test systems you own or are explicitly authorised in writing to test. Everything below targets a deliberately vulnerable machine you run, on an isolated network. No exceptions, no “just a quick scan of” anything else.
What Kali actually is (and isn’t)
Kali is a Linux distribution built for one audience: people doing authorised security work. That focus shapes some things worth knowing before you install it.
- It’s Debian-based, so if you know Ubuntu, you’re mostly home.
aptinstalls packages; the shell is the same. - Since the 2020.1 release it uses a normal non-root user by default (
kali/kali), a big safety improvement over the old always-root model. Yousudolike on any other distro. - The toolset is organised into metapackages so you install only what you need, which keeps the system smaller and easier to reason about.
- It is not a daily-driver desktop and not a hardened server. It’s a workbench you spin up for testing. Many people run it as a VM they can snapshot and revert.
Step 1 — Install Kali as a VM
The safest and most flexible way to run Kali is inside a virtual machine you can snapshot. Offensive Security publishes ready-made VM images, which is the fastest path:
- Download the pre-built VMware or VirtualBox image from kali.org (there’s also an installer ISO if you prefer a manual install, and WSL and ARM/Raspberry Pi builds).
- Import it into your hypervisor. Give it 2–4 CPUs, 4 GB+ RAM, and 40 GB+ disk.
- Boot and log in with the default
kali/kali, then immediately change the password:
passwd # set your own password straight away
- Update everything before you do anything else — Kali moves fast:
sudo apt update && sudo apt full-upgrade -y
- Take a snapshot called
clean. When a tool makes a mess, or you just want to start fresh, you revert.
If you installed the bare system and want to add toolsets, the metapackages make it one command each:
sudo apt install -y kali-linux-default # the standard toolkit
sudo apt install -y kali-tools-web # just the web-app tools
sudo apt install -y kali-tools-wireless # just the wireless tools
Step 2 — Build a target to practise on
This is the step that separates learning from trouble. You need something to point the tools at, and it must be yours, isolated, and meant to be broken. The standard practice setup:
- A second VM running a deliberately vulnerable system. Metasploitable 2/3, OWASP Juice Shop, or DVWA (Damn Vulnerable Web Application) are purpose-built for this.
- Both VMs on a host-only network with no route to the internet or your home LAN. The same rule any malware or testing lab lives by applies here: nothing you do should be able to reach anything real.
Everything from here points at 192.168.56.20 — a machine that exists only to be tested, by you, on a network only you can reach.
The methodology matters more than the tools
Newcomers collect tools; professionals follow a method. A real authorised engagement moves through phases, and Kali’s tools are organised to match them. Knowing the phase you’re in tells you which tool to pick and, more importantly, keeps you from wandering outside your agreed scope.
Notice phase 0 and phase 6: the work starts with permission and ends with a report. The exciting middle is only useful if those two bookend it. A finding nobody can act on, or a test nobody authorised, is worthless at best.
Phase 1–2: reconnaissance and scanning
The first real tool everyone learns is nmap — it maps what’s alive and what’s listening. Against your lab target:
# Discover hosts on the isolated lab network
nmap -sn 192.168.56.0/24
# Full TCP port + service/version scan of your target, with default scripts
nmap -sV -sC -p- 192.168.56.20 -oA scans/target_full
That -oA saves the results in three formats at once — get in the habit, because your notes become your report. The -sC runs nmap’s safe default scripts; the wider NSE script engine can check for specific issues:
# Example: run the "vuln" category scripts against the lab target
nmap --script vuln 192.168.56.20
For network services, enumeration tools dig into what nmap found — enum4linux-ng for SMB/Windows shares, smbclient to list shares, dnsenum for DNS. The goal of this phase is a complete inventory: every open port, every service, every version.
Phase 3: finding the weaknesses
Now you match what you found against known issues. For web apps, nikto is the quick first pass:
nikto -h http://192.168.56.20 # your lab web server
searchsploit (the offline Exploit-DB mirror built into Kali) turns a version number into a list of known public exploits — invaluable for understanding why an old service is dangerous:
searchsploit vsftpd 2.3.4 # look up known issues for a service/version
This phase is about turning “here’s what’s running” into “here’s what’s weak, and how serious it is”. That severity judgement is what a client actually pays for.
Phase 4–5: exploitation and after — in your lab, within scope
This is where Kali’s reputation comes from, and where discipline matters most. The flagship is the Metasploit Framework, a structured platform for testing exploits against systems you’re authorised to test:
msfconsole # launch the framework
# inside msfconsole, against YOUR lab target only:
# search <service name> -> find a matching module
# use <module path> -> select it
# set RHOSTS 192.168.56.20 -> point it at the lab machine
# show options -> see what it needs
# check -> safely verify if the target looks vulnerable
# run -> execute (lab targets only)
I’m deliberately keeping this at the framework level rather than writing a break-in recipe, because the point isn’t a magic sequence of commands — it’s understanding what each module does, confirming it against a machine you own, and being able to explain the risk to whoever has to fix it. Metasploitable and the vulnerable web apps have guided walkthroughs for exactly this learning, which is the right place to practise the full chain.
Post-exploitation, on an authorised engagement, means documenting the access you proved and then cleaning up anything you changed — not rummaging further than your scope allows. The write-up is the product; the shell is just evidence for it.
Web and wireless, briefly
Two toolsets you’ll meet early:
- Burp Suite (Community edition ships with Kali) is the standard web-app testing proxy. It sits between your browser and the app, letting you inspect and modify requests. Point your browser’s proxy at Burp, add the CA certificate, and browse your lab’s DVWA to watch every request — the best way to understand web traffic, not just attack it. sqlmap automates detecting and demonstrating SQL injection against your lab app.
- Wireless tools (the
aircrack-ngsuite and friends) test Wi-Fi security — but only against your own access point. Testing a network you don’t own is exactly the line this whole post is about. This needs a wireless adapter that supports monitor mode, which is why many people keep a dedicated USB adapter for lab work.
Phase 6: the report (where the value is)
Every tool above produces output; none of it helps anyone until it’s a report. The habit that makes you useful: as you work, keep structured notes — which target, which finding, the evidence, the severity, and the fix. Kali even ships note-taking and reporting tools (CherryTree, Faraday) for this. A good finding reads outcome-first — what’s wrong, what it affects, how to prove it, and how to fix it:
FINDING : <what's wrong, one sentence>
AFFECTED : <host/app, in scope>
EVIDENCE : <the command output / screenshot that proves it>
RISK : <what an attacker could do, and how likely>
FIX : <the specific remediation>
A clean report that a defender can act on is worth more than the flashiest exploit. The whole point of offensive testing is to make the defence better.
Learn it the legal way
The fastest, safest way to get good at Kali is to practise against things built to be practised on. Beyond your own lab VMs, there are legal, intentional playgrounds: Hack The Box, TryHackMe, VulnHub, and PortSwigger’s Web Security Academy (free, and excellent for the web side). These give you real targets with none of the legal risk, and most come with guided paths that teach the method, not just the keystrokes.
Kali is maintained in the open by OffSec. Start from the official Kali documentation and the tools listing, which documents every included tool with usage examples. Install it, build a lab, pick a vulnerable target, and work the phases end to end — permission first, report last. Do that a dozen times and the toolbox turns into a craft.