The Kali Linux Picture Book
1 Scope 2 Recon 3 Scan 4 Test 5 Report 6 Fix YOUR lab / authorized target
PLATE 0 — Testing is a loop. It starts with permission and ends with a fix.
A picture book for grown-ups · with commands

Kali Linux: A Field Guide to Ethical Testing

Eight spreads. Each has a picture, the idea, and the commands you'd run in a home lab or an engagement you're authorized for.

Say it like a pro

"Written scope first. Then recon, scan, validate, and report with fixes."

Only test systems you own or have written permission to test. Use the tabs or the ← → keys.

host-only / internal network 192.168.56.0/24 Kali.56.10 Metasploitable.56.20 DVWA / Juice Shop.56.30 no route to the real internet snapshot before you break things
PLATE 1 — Practice where nothing real can get hurt.
Chapter 1 · Lab and rules

Build a safe lab, and know the line

Kali is a Debian-based distro with hundreds of security tools preinstalled. Scanning or attacking systems you don't have permission for is illegal in most places, even "just to look."

  1. Install Kali as a VM (VirtualBox, VMware, or the prebuilt image).
  2. Add intentionally vulnerable targets: Metasploitable 2, DVWA, OWASP Juice Shop, or free rooms on TryHackMe and Hack The Box.
  3. Put them on a host-only or internal network. Snapshot first.
scope
the written list of what you may test, when, and how
RoE
rules of engagement: no DoS, no data exfiltration, stop if you find real data
authorization
signed permission from the system owner. No paper, no test.
$ ip addr show           # confirm you're on the lab subnet
$ ping -c 2 192.168.56.20
$ cat /etc/os-release
Say it like a pro

"Out of scope means out of scope. If it's not in the document, I don't touch it."

Information gatheringnmap · whois · dig Vulnerability analysisnikto · nmap NSE · OpenVAS Web applicationsBurp · gobuster · sqlmap Password attackshashcat · john · hydra SniffingWireshark · tcpdump ExploitationMetasploit Modern Kali defaults normal user + sudo (root login is gone) tools are ordinary Debian packages in /usr/bin
PLATE 2 — The app menu mirrors the order you work in.
Chapter 2 · Getting around Kali

It's Debian with a toolbox bolted on

Everything from ordinary Linux still applies: files, pipes, permissions, apt. Kali just ships the tools and keeps them current.

Keep it fresh
$ sudo apt update && sudo apt full-upgrade -y
$ sudo apt install kali-linux-default   # the standard set
$ apt search kali-tools-         # metapackages by theme
$ sudo apt install kali-tools-web
$ nmap --help | less ; man nmap
$ mkdir -p ~/engagements/lab1/{scans,notes,loot}
tmux
several terminals in one; sessions survive disconnects
tee
cmd | tee out.txt keeps evidence while you watch
Say it like a pro

"I keep one folder per engagement and save every scan's output as evidence."

nmap Target 192.168.56.20 22 open · ssh 80 open · http 23 closed · RST back 445 filtered · silence open = a service is listening. That's your attack surface. filtered = a firewall is dropping probes
PLATE 3 — Knock on every door, and write down which ones answer.
Chapter 3 · Reconnaissance

Find hosts, ports, and what's behind them

nmap on your lab
$ nmap -sn 192.168.56.0/24            # who's alive (ping sweep)
$ nmap -sV -sC 192.168.56.20       # versions + default scripts
$ nmap -p- -T4 192.168.56.20       # all 65535 ports
$ sudo nmap -O 192.168.56.20       # OS guess
$ nmap -sV -oA scans/target 192.168.56.20   # save all formats
$ nmap --script vuln 192.168.56.20  # NSE vuln checks
Passive info on a domain you own
$ whois example.com ; dig example.com ANY +short
$ dig +short mx example.com ; host -t ns example.com
-sV
probe versions: OpenSSH 4.7 tells you what's outdated
-T4
speed; lower it on fragile or monitored networks
Say it like a pro

"The service banner says an old version, so I'll check the CVE list and verify it, not assume it."

Browser Burp proxy127.0.0.1:8080 Web app pause · inspect · edit · replay What lives in the OWASP Top 10 broken access control · injection (SQLi, XSS) weak crypto · misconfiguration · outdated components auth failures · SSRF · insecure design fix: validate input, parameterize queries, least privilege
PLATE 4 — The proxy lets you read the conversation your browser normally hides.
Chapter 4 · Web application testing

Practice on DVWA and Juice Shop

Map and check the target (your lab app)
$ curl -I http://192.168.56.30/     # headers: server, cookies
$ nikto -h http://192.168.56.30      # known-bad config check
$ gobuster dir -u http://192.168.56.30 \
    -w /usr/share/wordlists/dirb/common.txt
$ whatweb http://192.168.56.30      # fingerprint the stack
$ burpsuite &                      # set browser proxy to 127.0.0.1:8080

Work through each vulnerability class on DVWA's low setting, then raise the security level. Seeing why a fix works is the real lesson.

SQLi
input becomes part of the query. Fix: prepared statements.
XSS
input runs as script in other users' browsers. Fix: output encoding, CSP.
Say it like a pro

"Scanner hits are leads. I confirm each one by hand before it goes in the report."

filter: ip.addr == 192.168.56.30 && http 1 TCP SYN → 80 2 TCP SYN,ACK ← 80 3 HTTP GET /login.php (readable!) 4 TLS Application Data (encrypted) Lesson plain HTTP, FTP, Telnet: credentials in the clear TLS hides content, but metadata (who, when, how much) shows this is why defenders want HTTPS and SSH everywhere
PLATE 5 — A packet capture is a recording of the wire.
Chapter 5 · Packet analysis

Watch the traffic on your own lab

Capture and read
$ sudo tcpdump -i eth0 -n host 192.168.56.30
$ sudo tcpdump -i eth0 -w scans/lab.pcap port 80
$ tcpdump -nn -r scans/lab.pcap | head
$ wireshark scans/lab.pcap &
$ tshark -r scans/lab.pcap -Y http.request \
    -T fields -e http.host -e http.request.uri
-n
don't resolve names; faster and cleaner
BPF
capture filters like port 80, host x, tcp
display filter
Wireshark's richer syntax: http.request.method == "POST"

Capture traffic only on networks you own. Sniffing other people's traffic is wiretapping.

Say it like a pro

"Credentials crossing the wire in cleartext is a finding. The fix is TLS everywhere."

Summer2024! hash() 5f4dcc3b5a… one-way: easy forward, can't reverse An audit guesses and compares wordlist → hash each guess → match the stolen hash? common word + digits: seconds · 16 random chars: centuries Defences long passphrases · unique per site · MFA · slow salted hashes (argon2, bcrypt)
PLATE 6 — Cracking tests whether your users' passwords are guessable.
Chapter 6 · Password auditing

Hashes, wordlists, and why length wins

Defenders audit hashes from their own systems to find weak passwords before attackers do. Practice with hashes you generate yourself.

Make a test hash, then audit it
$ echo -n "letmein" | md5sum | cut -d' ' -f1 > h.txt
$ hashid h.txt                       # what type is it?
$ hashcat -m 0 -a 0 h.txt /usr/share/wordlists/rockyou.txt
$ john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt h.txt
$ john --show --format=raw-md5 h.txt
rockyou.txt
real leaked passwords; gunzip it first
salt
random per-user value that stops precomputed tables
online
guessing against a live login is noisy and locks accounts. Only with explicit permission.
Say it like a pro

"The audit cracked 40% in an hour, so we're enforcing length, MFA, and a banned-password list."

search use set run find module load it RHOSTS, payload try it Why proving it matters a scanner says "might be vulnerable" a controlled test shows "is vulnerable, here's the impact" in real engagements: only in-scope hosts, agreed windows, no destructive payloads, clean up, and tell the client the goal is a fixed vulnerability, not a trophy
PLATE 7 — Proof turns a maybe into a priority.
Chapter 7 · Validating findings

Metasploit, against the lab only

Metasploit is a framework of tested modules. Use it on Metasploitable to see how an unpatched service turns into access, and what patching would have prevented.

msfconsole workflow
$ sudo msfdb init ; msfconsole -q
msf6> db_nmap -sV 192.168.56.20      # results go into the database
msf6> hosts ; services
msf6> search vsftpd 2.3.4
msf6> use exploit/unix/ftp/vsftpd_234_backdoor
msf6> show options
msf6> set RHOSTS 192.168.56.20
msf6> run
CVE
public ID for a flaw, e.g. CVE-2011-2523; look it up on NVD
CVSS
0–10 severity score; combine it with business impact
patch
the real outcome: update the vulnerable service
Say it like a pro

"Outdated vsftpd on port 21: exploitable in the lab, mitigated by upgrading and firewalling the port."

HIGH · Outdated FTP service Where: 192.168.56.20:21 Evidence: nmap -sV output, screenshot Impact: remote code execution Fix: upgrade vsftpd; restrict by firewall Ref: CVE-2011-2523 · CVSS 9.8 reproducible steps → anyone can verify Reportexec summary+ technical Fix → Retestclose the loop
PLATE 8 — A finding nobody can act on might as well not exist.
Chapter 8 · Reporting

The report is the product

Clients pay for clear findings and fixes, not for shell screenshots. Write for two readers: a manager who needs risk, and an engineer who needs steps.

  1. Executive summary: what was tested, overall risk, top three fixes.
  2. Findings: title, severity, affected asset, evidence, impact, remediation.
  3. Methodology and scope: what you did and didn't touch.
  4. Retest: confirm each fix actually worked.
$ script -a notes/session.log      # record the terminal
$ sha256sum scans/* > scans/SHA256SUMS   # evidence integrity
$ nmap -oX scans/t.xml 192.168.56.20 ; xsltproc scans/t.xml -o scans/t.html
next steps
TryHackMe, Hack The Box, OverTheWire, then CompTIA Security+ / PNPT / OSCP
Say it like a pro

"Every finding has evidence, impact, a fix, and a retest."