DOCODIVE
Intermediate Free Learning Path

Cybersecurity Intermediate: Offense & Defense

Level up from fundamentals to real tools. Master packet analysis, vulnerability scanning, web attacks, password cracking, privilege escalation, SIEM, forensics, and run a full penetration testing capstone.

6–8 weeks 30 lessons 1 pentest capstone Beginner completed
Start Learning
01

Networking Deep Dive: The OSI & TCP/IP Models

28 min
What you'll learn
  • Understand the 7 OSI layers
  • Map attacks to layers
  • Use networking commands

The OSI model splits networking into seven layers, from physical cables to the application. TCP/IP condenses these into four practical layers. Security teams map every attack to a layer — ARP spoofing hits layer 2, DDoS floods layer 3, SYN attacks layer 4, and SQL injection layer 7. Knowing which layer an attack targets tells you which defense to place there. A few commands reveal the network state instantly.

networking.sh
ip addr show                    # interfaces and IPs
ip route show                   # routing table
ss -tulpn                       # listening sockets
nslookup example.com           # DNS lookup
ping -c 4 8.8.8.8              # connectivity test
Live Preview
Networking Deep Dive: The OSI & TCP/IP Models
7 Application
4 Transport
3 Network
2 Data Link
🔎 Important: Map every attack to an OSI layer — the layer tells you exactly which defense applies.
Try it yourself

At which OSI layer does ARP spoofing operate?

MAC addresses.
Layer 2 (Data Link) — ARP maps IP to MAC addresses.
02

Packet Analysis with Wireshark

30 min
What you'll learn
  • Capture and inspect packets
  • Understand TCP handshake
  • Spot malicious traffic

Wireshark captures and dissects raw network packets. Each TCP connection starts with a three-way handshake: SYN, SYN-ACK, ACK. Analysts look for anomalies — unusual ports, repeated SYN without completion (scanning), or large data exfiltration. Filters like 'tcp.port == 443' or 'http.request' narrow millions of packets to the few that matter. Packet analysis is the microscope of network security, turning invisible traffic into readable evidence.

wireshark.txt
# Wireshark capture filters (type into the capture bar)
tcp.port == 443       # only HTTPS traffic
http.request          # only HTTP requests
ip.addr == 10.0.0.5   # only one host
# tshark (CLI) equivalent
tshark -i eth0 -Y 'dns' -c 50
Live Preview
Packet Analysis with Wireshark
SYN
SYN-ACK
ACK
✓ Best Practice: Learn the TCP handshake first — SYN, SYN-ACK, ACK — then anomalies jump out at you.
Try it yourself

What are the three steps of the TCP handshake?

SYN...
SYN, SYN-ACK, ACK.
03

Advanced Nmap Scanning

28 min
What you'll learn
  • Master Nmap scan types
  • Evade basic detection
  • Interpret results

Nmap is the standard port scanner, but it is far more than that. SYN scans (-sS) are stealthier than full connects; version detection (-sV) identifies services; scripts (-sC) run vulnerability probes; and OS detection (-O) guesses the target system. Timing templates (-T0 to -T5) trade speed for stealth. Understanding scan output — open, closed, filtered — tells you both what is exposed and whether a firewall is in the way.

nmap.sh
# SYN scan (stealth, default)
nmap -sS 192.168.1.10
# Version + default scripts + OS detection
nmap -sV -sC -O 192.168.1.10
# Scan a whole subnet for port 22
nmap -p 22 192.168.1.0/24
Live Preview
Advanced Nmap Scanning
-sS
-sV
-sC
-O
⚠️ Common Mistake: Only scan systems you own or have written permission to test — authorization first.
Try it yourself

What does a 'filtered' port result usually mean?

Not answering.
A firewall is dropping the packets — the port state cannot be determined.
04

Vulnerability Scanning (OpenVAS & Nessus)

26 min
What you'll learn
  • Understand vuln scanning
  • Differentiate from pentesting
  • Prioritize findings

Vulnerability scanners automate the search for known weaknesses — missing patches, default credentials, misconfigurations. OpenVAS is free; Nessus is the commercial standard. Unlike manual pentesting, scanners cover thousands of checks quickly but produce false positives. The skill is triage: filter results by severity (CVSS score), verify the critical ones manually, and patch the real issues. A scanner is a flashlight, not a verdict.

vulnscan.sh
# Start OpenVAS and run a scan (simplified)
gvm-start
# Typical scan targets
# 1. Discovery scan — what is alive
# 2. Full scan — all ports, all checks
# 3. Compliance scan — policy-specific checks
Live Preview
Vulnerability Scanning (OpenVAS & Nessus)
scan
CVSS
patch
🔎 Important: Scanners produce false positives — always verify critical findings manually before acting.
Try it yourself

What metric is commonly used to score vulnerability severity?

Four letters.
CVSS — Common Vulnerability Scoring System.
05

OSINT & Reconnaissance

26 min
What you'll learn
  • Gather public information
  • Use OSINT tools
  • Map an attack surface

Before attacking, testers gather open-source intelligence (OSINT) — everything publicly available about a target. This includes DNS records, subdomains, employee emails, leaked credentials, and exposed services. Tools like theHarvester, Shodan, and Google dorking turn public data into an attack map. Defenders use the same techniques to see their own exposure and take down risky information before attackers find it.

osint.sh
# Google dork examples
site:example.com filetype:pdf
intitle:'index of' 'backup'
# TheHarvester (email/subdomain gathering)
theHarvester -d example.com -b google,linkedin
# Shodan (exposed services)
shodan search 'default password port:23'
Live Preview
OSINT & Reconnaissance
dns
subdomains
emails
✓ Best Practice: Run OSINT against your own organization first — you cannot defend what you do not know is exposed.
Try it yourself

What does OSINT stand for?

Public data.
Open Source Intelligence — publicly available information gathering.
06

SQL Injection Deep Dive

30 min
What you'll learn
  • Understand SQLi mechanics
  • Exploit error-based injection
  • Defend with prepared statements

SQL injection happens when user input is concatenated directly into a SQL query, letting attackers rewrite the query. Classic attacks include bypassing login with ' OR '1'='1, extracting data with UNION SELECT, and even writing files. The defense is definitive and simple: parameterized queries (prepared statements) separate code from data so input can never become SQL. This one flaw has caused some of the largest breaches in history, which is why it has topped the OWASP list for years.

sqli.py
# Vulnerable (never do this)
# query = f"SELECT * FROM users WHERE name = '{user_input}'"

# Safe: parameterized query
cur.execute('SELECT * FROM users WHERE name = %s', (user_input,))
Live Preview
SQL Injection Deep Dive
' OR '1'='1
? params
⚠️ Common Mistake: Parameterized queries are the only reliable SQLi defense — escaping alone is fragile.
Try it yourself

Which query construction prevents SQL injection?

Parameters.
Parameterized queries (prepared statements) that separate code from data.
07

Cross-Site Scripting (XSS) Deep Dive

28 min
What you'll learn
  • Understand XSS types
  • Craft proof-of-concept payloads
  • Defend with output encoding

XSS injects JavaScript into a page that runs in another user's browser. Reflected XSS bounces off a request; stored XSS persists in a database and hits every visitor; DOM-based XSS runs purely client-side. Consequences range from session theft to full account takeover. The defense is output encoding — render user data as text, never as HTML, in the exact context where it appears. Content Security Policy adds a powerful second layer.

xss.html
<!-- Vulnerable (never do this) -->
<!-- <div>{user_input}</div> -->

<!-- Basic payload to prove the bug -->
<script>alert(document.domain)</script>

<!-- Safe: escape output before rendering -->
{% raw %}{{ user_input }}{% endraw %}  <!-- Jinja auto-escapes -->
Live Preview
Cross-Site Scripting (XSS) Deep Dive
<script>
escape output
⚠️ Common Mistake: Always encode user output as text — auto-escaping frameworks and CSP are your best friends.
Try it yourself

Which XSS type is stored in the database and hits every visitor?

Persistent.
Stored (persistent) XSS.
08

CSRF & Broken Access Control

26 min
What you'll learn
  • Understand CSRF attacks
  • Recognize IDOR flaws
  • Enforce authorization

Cross-Site Request Forgery (CSRF) tricks a logged-in user's browser into making unwanted requests — like transferring money — without their knowledge. Broken access control is even more common: Insecure Direct Object References (IDOR) let users access other users' records by changing an ID in the URL. Defenses: CSRF tokens on state-changing requests, server-side authorization checks on every endpoint, and never trusting IDs blindly.

idor.py
# IDOR example
# /profile/123  -> your profile
# /profile/124  -> someone else's (if not checked = bug)

# Server-side check (concept)
if session.user_id != requested_id:
    abort(403)  # Forbidden
Live Preview
CSRF & Broken Access Control
request
+
token
=
safe
🔎 Important: Authorize on the server for every request — client-side checks are bypassable.
Try it yourself

What token prevents CSRF attacks?

Per-request secret.
A CSRF token — a unique secret tied to the user's session.
09

File Upload Vulnerabilities

26 min
What you'll learn
  • Exploit unsafe uploads
  • Bypass weak filters
  • Secure file handling

File upload features are a common entry point. If a server accepts user files without validation, an attacker can upload a web shell — a script that gives remote command execution. Even image uploads can hide code if the server trusts the extension or MIME type. Defenses: validate file type by content, store uploads outside the web root, rename files with random names, and serve them with a safe Content-Type. Never let user input decide where files are written.

upload.py
# PHP web shell (simplified, for education)
# <?php echo shell_exec($_GET['cmd']); ?>

# Defense: validate extension AND MIME type
ALLOWED = {'.jpg', '.png'}
if ext not in ALLOWED:
    abort(400)
Live Preview
File Upload Vulnerabilities
shell.php
validate
=
blocked
⚠️ Common Mistake: Never trust the filename or MIME type — validate content and serve uploads safely.
Try it yourself

What is a web shell?

Uploaded script.
An uploaded script that gives the attacker remote command execution.
10

Command Injection

24 min
What you'll learn
  • Understand command injection
  • Chain OS commands
  • Defend with safe execution

Command injection occurs when user input is passed to a system shell, letting attackers append their own commands. Classic tricks use ;, &&, |, or backticks to chain commands after the intended one. Even a simple 'ping' form becomes dangerous if the input reaches a shell. The defense: avoid shelling out entirely; if you must, use safe APIs that accept arguments as a list and never concatenate user input into a command string.

cmdi.py
# Vulnerable (never do this)
# os.system(f"ping {user_input}")
# Attacker input: 8.8.8.8; rm -rf /

# Safe: pass args as a list (no shell)
import subprocess
subprocess.run(['ping', '-c', '4', user_input])
Live Preview
Command Injection
; rm -rf
no shell
⚠️ Common Mistake: Use argument-list APIs (no shell) and never concatenate user input into commands.
Try it yourself

Which characters are commonly used to chain OS commands?

Shell separators.
Semicolon (;), pipe (|), and ampersands (&&).
11

Password Cracking with Hashcat

28 min
What you'll learn
  • Understand hash cracking
  • Use wordlists and rules
  • Defend with strong hashes

Password crackers test guesses against a captured hash. Dictionary attacks try common passwords; brute force tries every combination; rule-based attacks mutate words (adding numbers, swapping letters). Hashcat runs on GPUs and can try billions of guesses per second. This is why password strength and slow hashing algorithms matter — bcrypt and Argon2 deliberately slow down each guess, making cracking impractical even for fast hardware.

hashcat.sh
# Crack an MD5 hash with a wordlist
hashcat -m 0 hash.txt rockyou.txt
# Brute-force 8-char lowercase (slow, educational)
hashcat -m 0 hash.txt -a 3 ?l?l?l?l?l?l?l?l
# Defend: use bcrypt/Argon2 (slow by design)
Live Preview
Password Cracking with Hashcat
MD5
weak
bcrypt
strong
✓ Best Practice: Defend with bcrypt or Argon2 — slow hashes turn GPU cracking from seconds into centuries.
Try it yourself

Why are bcrypt and Argon2 better than MD5 for passwords?

Speed.
They are deliberately slow, making each guess expensive and cracking impractical.
12

Linux Privilege Escalation

30 min
What you'll learn
  • Find escalation paths
  • Exploit misconfigurations
  • Harden against escalation

Privilege escalation turns a limited user into root. Common vectors: SUID binaries with dangerous permissions, world-writable files, cron jobs running as root, and kernel exploits. The process is systematic — enumerate the system, find misconfigurations, exploit the weakest one. Defenders close these paths by enforcing least privilege, auditing SUID binaries, and patching the kernel. Linux hardening is the mirror image of Linux escalation.

privesc.sh
# Enumerate escalation paths
find / -perm -4000 -type f 2>/dev/null   # SUID binaries
sudo -l                                   # sudo rights
cat /etc/crontab                          # cron jobs
# Check kernel version for known exploits
uname -a
Live Preview
Linux Privilege Escalation
SUID
cron
sudo
⚠️ Common Mistake: Audit SUID binaries and cron jobs — they are the most common Linux escalation vectors.
Try it yourself

What are SUID binaries in the context of privilege escalation?

Run as owner.
Programs that run with the file owner's privileges — a root-owned SUID binary can be exploited.
13

Windows Privilege Escalation

30 min
What you'll learn
  • Enumerate Windows privileges
  • Exploit service misconfigurations
  • Patch and harden

Windows escalation often abuses service misconfigurations: unquoted service paths, weak service permissions, and always-install-elevated settings. Token impersonation (SeImpersonatePrivilege) enables attacks like Potato exploits to gain SYSTEM. The process is the same as Linux — enumerate, find the weakness, exploit, then document. Defenders apply least privilege, lock down service ACLs, and patch promptly. Windows hardening closes the doors escalation techniques walk through.

winpriv.ps1
# Enumerate (PowerShell)
whoami /priv
Get-Service | Where-Object {$_.Status -eq 'Running'}
# Check unquoted service paths
wmic service get name,pathname | findstr /i /v 'C:\Windows\'
Live Preview
Windows Privilege Escalation
whoami
SYSTEM
⚠️ Common Mistake: Lock down service permissions and quote all service paths — these are classic escalation doors.
Try it yourself

What does SeImpersonatePrivilege enable?

Token.
It lets a process impersonate a higher-privilege token, enabling Potato-style SYSTEM escalation.
14

Lateral Movement & Pivoting

28 min
What you'll learn
  • Understand lateral movement
  • Use Pass-the-Hash and PsExec
  • Defend with segmentation

Once inside a network, attackers move sideways to reach valuable targets. Techniques include Pass-the-Hash (reusing password hashes without knowing passwords), PsExec (remote command execution), and RDP hopping. Pivoting routes traffic through a compromised host to reach otherwise-isolated segments. Defense is network segmentation, strong credential hygiene, and monitoring for lateral movement patterns — the quiet middle of an attack is where the real damage happens.

lateral.sh
# Pass-the-Hash with Impacket (educational)
psexec.py -hashes <LM:NT> domain/admin@target cmd
# Detect unusual RDP/logon patterns in logs
# Look for the same account logging into many hosts quickly
Live Preview
Lateral Movement & Pivoting
host A
host B
target
🔎 Important: Segment networks and monitor for one account logging into many hosts — that is lateral movement's footprint.
Try it yourself

What does Pass-the-Hash reuse?

Not the password.
The password hash — attackers authenticate with the hash instead of the plaintext password.
15

Persistence Mechanisms

26 min
What you'll learn
  • Understand attacker persistence
  • Find backdoors
  • Eradicate persistence

Persistence keeps attacker access alive across reboots and password changes. On Linux: cron jobs, SSH authorized keys, and systemd services. On Windows: registry Run keys, scheduled tasks, and services. Detection requires hunting for unusual auto-start entries and new users. Eradication is not just deleting the backdoor — you must find every persistence point, or the attacker simply re-enters through a hidden door.

persistence.sh
# Linux persistence checks
crontab -l
cat ~/.ssh/authorized_keys
systemctl list-units --type=service
# Windows registry Run keys (PowerShell)
Get-ItemProperty 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Run'
Live Preview
Persistence Mechanisms
cron job
ssh key
registry Run
⚠️ Common Mistake: After a breach, hunt every auto-start entry — miss one and the attacker walks back in.
Try it yourself

Name one common Linux persistence mechanism.

Auto-runs.
Cron jobs, SSH authorized keys, or systemd services.
16

Linux Hardening

28 min
What you'll learn
  • Apply defense-in-depth
  • Use firewalls and SELinux
  • Audit system security

Linux hardening layers defenses to make compromise harder. Steps: remove unnecessary services, enforce least privilege with sudo, configure a default-deny firewall, enable SELinux or AppArmor (mandatory access control), enforce strong SSH (disable root login, use keys), and audit logs. Tools like Lynis automate the audit. Hardening is not a one-time task — it is continuous, because new vulnerabilities and misconfigurations appear constantly.

hardening.sh
# SSH hardening (/etc/ssh/sshd_config)
# PermitRootLogin no
# PasswordAuthentication no

# Enable UFW
sudo ufw default deny incoming
sudo ufw allow 22/tcp
sudo ufw enable

# Audit with Lynis
sudo lynis audit system
Live Preview
Linux Hardening
root login
key only
✓ Best Practice: Disable root SSH login and use keys — it closes the most-targeted door instantly.
Try it yourself

What does SELinux/AppArmor provide?

Access control.
Mandatory access control that restricts what processes can do even if compromised.
17

SIEM & Log Analysis

30 min
What you'll learn
  • Understand SIEM purpose
  • Correlate security events
  • Hunt threats in logs

A SIEM (Security Information and Event Management) collects and correlates logs from across the environment, alerting on patterns that single systems miss — a failed login here, a file access there, together forming an attack. Analysts write detection rules and hunt for indicators of compromise. Tools range from Splunk and Elastic to open-source Wazuh. The skill is querying logs to answer 'who did what, when, and from where.'

siem.txt
# Splunk query: failed logins by source IP
index=auth sourcetype=linux_secure "Failed password"
| stats count by src_ip
| sort - count
# Alert when one IP has 10+ failures in 5 minutes
Live Preview
SIEM & Log Analysis
logs
collect
alert
correlate
✓ Best Practice: Correlate across sources — one log is noise, but patterns across logs are an attack signature.
Try it yourself

What does SIEM stand for?

Logs + correlation.
Security Information and Event Management.
18

IDS/IPS with Snort & Suricata

28 min
What you'll learn
  • Understand IDS vs IPS
  • Write detection rules
  • Deploy network monitoring

An Intrusion Detection System (IDS) watches traffic and alerts; an Intrusion Prevention System (IPS) blocks it. Snort and Suricata are the open-source standards, using signature rules to detect known attack patterns. A basic rule matches source, destination, ports, and content. Deploy them at network chokepoints to see attacks in flight. The key skill is writing and tuning rules so they catch real threats without drowning you in false alarms.

ids.rules
# Basic Snort rule (alert on suspicious user-agent)
alert tcp any any -> any 80 (msg:"Bad UA"; content:"nmap"; sid:1001;)
# Run Suricata on an interface
sudo suricata -i eth0 -c /etc/suricata/suricata.yaml
Live Preview
IDS/IPS with Snort & Suricata
IDS
alert
IPS
block
🔎 Important: Tune your rules — an IPS that blocks everything is worse than one that blocks nothing.
Try it yourself

What is the difference between IDS and IPS?

Alert vs block.
IDS only alerts on threats; IPS actively blocks them.
19

Threat Intelligence

24 min
What you'll learn
  • Understand threat intel
  • Use IOCs
  • Apply intel to defense

Threat intelligence is information about attackers — their tools, tactics, and infrastructure. Indicators of Compromise (IOCs) include malicious IPs, domains, file hashes, and patterns. Intel sources range from free feeds (AlienVault OTX) to commercial platforms, plus frameworks like MITRE ATT&CK that describe adversary techniques. Defenders use intel to block known bad infrastructure and to prioritize which techniques to defend against first. Intel turns reactive defense into proactive hunting.

threatintel.sh
# Check an IP/domain against AlienVault OTX (concept)
# OTX API returns pulses (reports) about an IOC
# Blocklist a bad IP
sudo ufw deny from 185.220.101.4
# MITRE technique lookup: T1059 (command execution)
Live Preview
Threat Intelligence
bad IP
blocklist
✓ Best Practice: Use MITRE ATT&CK to understand how attackers work — then hunt for those exact techniques.
Try it yourself

What is an IOC?

Evidence of attack.
Indicator of Compromise — evidence like malicious IPs, domains, or file hashes.
20

Digital Forensics Fundamentals

30 min
What you'll learn
  • Preserve evidence
  • Image and analyze disks
  • Recover deleted data

Digital forensics investigates what happened on a system while preserving evidence for legal use. The golden rule is order of volatility — capture memory before disk, and never alter the original. Investigators image disks with write-blockers, analyze file systems, recover deleted files, and reconstruct timelines. Tools include dd, Autopsy, and Volatility for memory. Forensics is as much about process and chain-of-custody as it is about tools.

forensics.sh
# Create a forensic disk image (read-only)
dd if=/dev/sdb of=evidence.img bs=4M status=progress
# Verify integrity with a hash
sha256sum evidence.img
# Analyze memory with Volatility
volatility -f memory.dmp imageinfo
Live Preview
Digital Forensics Fundamentals
evidence.img
hash
=
verified
🔎 Important: Never analyze the original — image it first and hash the copy to prove integrity.
Try it yourself

What is the order of volatility?

Most volatile first.
Capture the most volatile data first — memory, then disk.
21

Malware Analysis Basics

30 min
What you'll learn
  • Analyze safely
  • Distinguish static and dynamic
  • Extract IOCs

Malware analysis asks: what does this binary do? Static analysis inspects the file without running it — strings, imports, hashes. Dynamic analysis runs it in an isolated sandbox and watches its behavior. Both are complementary: static reveals the code's structure, dynamic reveals its actions. Safety is paramount — analyze in a VM or disposable sandbox. The goal is IOCs — the hashes, domains, and registry keys that let you detect and block the malware everywhere.

malanalysis.sh
# Static: strings and hashes
strings suspicious.exe | grep -i 'http\|cmd\|registry'
sha256sum suspicious.exe
# Dynamic (sandbox only): watch file and network activity
strace -f ./suspicious.exe 2>&1 | head -100
Live Preview
Malware Analysis Basics
static
+
dynamic
=
IOCs
⚠️ Common Mistake: Always analyze malware in an isolated VM — never on your real machine.
Try it yourself

What is the difference between static and dynamic analysis?

Run vs no run.
Static inspects without running; dynamic runs it in a sandbox to observe behavior.
22

Reverse Engineering Intro

32 min
What you'll learn
  • Understand disassembly
  • Read basic assembly
  • Use Ghidra

Reverse engineering recovers the logic of a compiled program. Disassemblers (Ghidra, IDA) convert machine code to assembly; decompilers approximate the original source. Even basic x86 understanding — registers, calls, comparisons — reveals what a binary does. Reverse engineers find hidden functionality, understand exploits, and patch flaws. It is a deep skill but starts small: open a binary in Ghidra, follow main, and trace the logic.

reversing.txt
# Open a binary in Ghidra (GUI)
# Key x86 concepts:
#   mov eax, 5    ; put 5 in register eax
#   cmp eax, 0    ; compare eax to 0
#   je  label     ; jump if equal
#   call func     ; call a function
Live Preview
Reverse Engineering Intro
machine code
assembly
logic
🔎 Important: Start with Ghidra and learn basic assembly — reverse engineering is a gradual skill, not a magic trick.
Try it yourself

What does a disassembler do?

Machine to human.
It converts machine code into human-readable assembly instructions.
23

Burp Suite & Web App Pentesting

32 min
What you'll learn
  • Intercept web traffic
  • Manipulate requests
  • Automate attacks

Burp Suite is the standard toolkit for testing web apps. Its proxy intercepts requests so you can modify parameters before they reach the server. The repeater resends modified requests; the intruder automates attacks like fuzzing and brute force; the scanner finds common vulnerabilities. Testing web apps is systematic — map the app, understand each function, then probe inputs. Burp turns the browser into a precise attack tool.

burp.txt
# Burp workflow
# 1. Configure browser to use Burp proxy (127.0.0.1:8080)
# 2. Browse the app, watch requests in Proxy > History
# 3. Send a request to Repeater, modify a parameter
# 4. Use Intruder to fuzz an input with payloads
Live Preview
Burp Suite & Web App Pentesting
Proxy
Repeater
Intruder
✓ Best Practice: Learn Repeater before Intruder — understanding one request deeply beats spraying thousands blindly.
Try it yourself

What does the Burp Repeater tool do?

Resend.
It resends modified HTTP requests so you can test parameter changes precisely.
24

API Security

28 min
What you'll learn
  • Understand API risks
  • Exploit broken object-level auth
  • Secure APIs

APIs are the new attack surface — modern apps are mostly APIs behind the UI. The OWASP API Top 10 highlights broken object-level authorization (BOLA), broken authentication, and excessive data exposure. Attackers enumerate IDs, abuse weak tokens, and discover hidden endpoints. Defenses: strict server-side authorization, rate limiting, input validation, and strong API keys. Since APIs expose data directly, securing them is securing the application itself.

api.py
# BOLA example
# GET /api/users/123  -> your data
# GET /api/users/124  -> other user (if not checked)

# Defense: check ownership
if request.user_id != resource.owner_id:
    return 403
Live Preview
API Security
/users/124
403
🔎 Important: Authorize every API endpoint server-side — BOLA is the most common and most damaging API flaw.
Try it yourself

What is BOLA in API security?

Object IDs.
Broken Object Level Authorization — accessing other users' objects by changing IDs.
25

Wireless Attacks with Aircrack-ng

30 min
What you'll learn
  • Understand Wi-Fi attacks
  • Capture handshakes
  • Crack WPA passwords

Wireless attacks target the air interface. The Aircrack-ng suite puts a Wi-Fi card into monitor mode, captures packets, and cracks WPA/WPA2 passwords from the four-way handshake. Attacks include deauthentication (kicking a client off to force a re-handshake) and evil twin access points. These attacks only work on your own networks legally. Defenders use WPA3, long passphrases, and disable legacy protocols.

wifi-attack.sh
# Put card in monitor mode
airmon-ng start wlan0
# Capture a handshake
aireplay-ng --deauth 10 -a <BSSID> wlan0mon
airodump-ng -c <channel> --bssid <BSSID> -w cap wlan0mon
# Crack with a wordlist
aircrack-ng -w rockyou.txt cap-01.cap
Live Preview
Wireless Attacks with Aircrack-ng
monitor
handshake
crack
⚠️ Common Mistake: Only attack networks you own — and defend by using WPA3 with a long passphrase.
Try it yourself

What does a deauthentication attack force?

Reconnect.
It kicks a client off so it reconnects, allowing capture of the WPA handshake.
26

Social Engineering Toolkit (SET)

24 min
What you'll learn
  • Understand SET capabilities
  • Build phishing campaigns
  • Defend against manipulation

The Social Engineering Toolkit (SET) automates attacks that target humans — cloned websites, credential harvesters, and USB payloads. It demonstrates why people are the weakest link: even perfect technical defenses fail when a user hands over their password. Defenders counter with awareness training, simulated phishing tests, and technical controls like MFA. Understanding the attacker's playbook is the best way to teach users to spot it.

set.sh
# SET menu (educational)
setoolkit
# 1 = Social-Engineering Attacks
# 2 = Website Attack Vectors
# 3 = Credential Harvester (clone a login page)
Live Preview
Social Engineering Toolkit (SET)
clone page
MFA
=
safe
⚠️ Common Mistake: Use SET only for authorized awareness campaigns — and pair it with MFA as the safety net.
Try it yourself

What is the most effective technical defense against credential phishing?

Second factor.
MFA — even stolen credentials cannot be used without the second factor.
27

Penetration Testing Methodology

30 min
What you'll learn
  • Follow a structured pentest
  • Document findings
  • Report like a professional

A penetration test follows a clear methodology: scoping, reconnaissance, enumeration, exploitation, post-exploitation, and reporting. Frameworks like PTES and standards like OWASP define each phase. The deliverable is a report — findings ranked by severity, with reproduction steps and remediation advice. A great pentest is not about the most exploits; it is about clearly communicating risk so the organization can fix the right things first.

pentest.txt
# PTES phases (checklist)
# 1. Pre-engagement: scope, rules, authorization
# 2. Intelligence gathering: OSINT, DNS
# 3. Threat modeling: what matters most
# 4. Vulnerability analysis: scan + verify
# 5. Exploitation: prove impact
# 6. Post-exploitation: pivot, persistence
# 7. Reporting: findings + remediation
Live Preview
Penetration Testing Methodology
recon
exploit
report
🔎 Important: A pentest's value is the report — clear findings with reproduction and remediation beat raw exploits.
Try it yourself

What is the final and most important phase of a penetration test?

Communication.
Reporting — documenting findings, impact, and remediation.
28

Red Team vs Blue Team

24 min
What you'll learn
  • Understand red and blue roles
  • Run purple team exercises
  • Improve defense continuously

Red teams attack (offensively) to find weaknesses; blue teams defend (detect and respond). Purple teaming brings them together — red shares how they attack, blue tunes detections, and the cycle repeats. This continuous feedback loop is how security programs mature. Neither side wins alone: red finds gaps, blue closes them, and the organization's resilience grows with every iteration.

purple.txt
# Purple team loop
# 1. Red: execute an attack (e.g., lateral movement)
# 2. Blue: did your tools detect it?
# 3. Gap analysis: why or why not
# 4. Tune detections, update playbooks
# 5. Repeat with the next technique
Live Preview
Red Team vs Blue Team
red
blue
=
purple
✓ Best Practice: Purple teaming turns attacks into better detections — it is how blue teams actually improve.
Try it yourself

What is the role of the blue team?

Defense.
Blue teams defend — detecting, responding to, and mitigating attacks.
29

Building a Home Security Lab

28 min
What you'll learn
  • Design a practice lab
  • Use virtualization
  • Practice safely

A home lab is where you practice safely. Set up VirtualBox or VMware with isolated VMs — an attacker machine (Kali), targets (Metasploitable, vulnerable VMs), and a monitoring host. Keep it on an isolated network so your testing never touches your real devices. A lab lets you run every tool and technique legally and without fear. Start small: one Kali, one Metasploitable, and grow from there.

lab.sh
# Lab setup checklist
# 1. Install VirtualBox
# 2. Create isolated network (Host-only)
# 3. Kali VM (attack) -> kali.org downloads
# 4. Metasploitable 2 VM (target)
# 5. Snapshot before every test
Live Preview
Building a Home Security Lab
Kali (attacker)
Metasploitable (target)
isolated network
✓ Best Practice: Isolate your lab network — practice safely, never against systems you do not own.
Try it yourself

Why should a practice lab be on an isolated network?

Containment.
So testing traffic and exploits never reach your real devices or the internet.
30

Capstone: Full Penetration Test

70 min
What you'll learn
  • Apply the full methodology
  • Document findings
  • Present a professional report

Your capstone: run a complete penetration test against a deliberately vulnerable lab target. Execute every phase — scope, recon, enumeration, exploitation, privilege escalation, and reporting. Document each finding with severity, reproduction, and remediation. The deliverable is a professional report that proves you can think like an attacker and communicate like a consultant. This is the portfolio piece that demonstrates your readiness for a real security role.

capstone.sh
# Capstone execution plan
# 1. Recon: nmap -sV -sC -O target
# 2. Web enum: dirb, Burp, OWASP checks
# 3. Exploit a found vulnerability
# 4. Escalate: find SUID/cron/service flaws
# 5. Document: severity + reproduction + fix
# 6. Write the final report
Live Preview
Capstone: Full Penetration Test
recon → exploit → escalate
document → report
✓ Best Practice: The capstone is your proof — a clean report with real findings beats a wall of unverified exploits.
Try it yourself

What makes a pentest report professional?

Clarity.
Clear findings ranked by severity, with reproduction steps and remediation advice.
You've completed all 30 intermediate lessons. You're now a security practitioner.

Continue to Cybersecurity Advanced for zero-days, exploit development, cloud security, and red team operations.

📱 Scan this QR code with your phone camera to instantly open this page.

Works on iOS, Android, and any modern device. No app installation required.

Account Verified!

Your email has been verified successfully.