Cybersecurity Beginner Course
Learn how to defend systems and data. Master the CIA triad, malware, phishing, encryption, firewalls, authentication, incident response, and build a rock-solid security foundation.
Start LearningWhat is Cybersecurity? The CIA Triad
24 minWhat you'll learn
- Define cybersecurity
- Understand the CIA triad
- Know why security matters
Cybersecurity protects systems, networks, and data from digital attacks. Its foundation is the CIA triad: Confidentiality (only authorized people can read data), Integrity (data cannot be altered without detection), and Availability (systems stay up when needed). Every security control you will ever learn — firewalls, encryption, access policies, backups — maps back to one of these three goals. Understand the triad and you understand the 'why' behind every defensive decision.
Try it yourself
Which CIA pillar does encryption primarily protect?
Confidentiality — encryption hides data from unauthorized readers.
Threats, Vulnerabilities & Risks
22 minWhat you'll learn
- Distinguish the three terms
- Identify threat actors
- Understand risk calculation
These three words are not synonyms. A vulnerability is a weakness — a bug or a misconfiguration. A threat is something that can exploit that weakness — a hacker, malware, or a flood. Risk is the chance that a threat exploits a vulnerability and causes damage, usually scored as likelihood multiplied by impact. Security teams cannot eliminate all risk; they manage it by patching vulnerabilities, blocking threats, or lowering the impact of a breach. Reducing any one factor reduces the total risk.
Try it yourself
What is the difference between a vulnerability and a threat?
A vulnerability is a weakness; a threat is the danger that exploits it.
Malware: Viruses, Worms & Trojans
26 minWhat you'll learn
- Classify malware types
- Understand infection vectors
- Learn detection basics
Malware is malicious software. A virus attaches to a file and spreads when that file runs. A worm self-replicates across networks without user action. A trojan disguises itself as legitimate software. Then there is ransomware (encrypts your files for money), spyware (steals data), and rootkits (hide deep in the system). Detection combines antivirus signatures, behavior analysis, and good patch hygiene — because malware usually enters through unpatched software or human error. A few basic commands let you spot suspicious processes and network connections.
# Check running processes for suspicious names (Linux) ps aux | grep -i -E 'miner|backdoor|crypt' # Check listening ports netstat -tulnp # Scan a file for malware (ClamAV) clamscan /home/user/Downloads/suspicious.exe
Try it yourself
Which malware type spreads automatically across a network without user action?
A worm — it self-replicates over the network.
Phishing & Social Engineering
24 minWhat you'll learn
- Recognize phishing attacks
- Understand social engineering
- Learn email verification
Phishing tricks people into revealing credentials or installing malware by impersonating trusted senders. Social engineering is the broader art of manipulating humans — pretexting, baiting, scareware, even in-person tailgating. Email red flags: urgent language, mismatched sender domains, unexpected attachments, and links whose real destination does not match their visible text. The strongest technical controls still fail when a user is deceived, which is why humans are called the weakest link — and the most important defense. Hover over every link and read the actual domain before clicking.
Try it yourself
An email says 'Your account will close in 1 hour, click now.' What tactic is this?
Urgency — attackers create false time pressure to stop you from thinking.
Passwords & Authentication
22 minWhat you'll learn
- Create strong passwords
- Understand password hashing
- Know authentication factors
Authentication proves who you are. Passwords remain common but are weak when reused or simple. Modern systems never store plaintext passwords — they store a salted hash, so a database leak does not reveal the actual secret. Strong practices: use a password manager, long passphrases, and a unique password per site. A credential breach on one site becomes a breach everywhere if you reuse passwords, because attackers try stolen credentials on every other service. The hashing example below shows the concept in a few lines of Python.
import hashlib
def hash_password(pw, salt='s0m3s@lt'):
return hashlib.sha256((salt + pw).encode()).hexdigest()
print(hash_password('correct horse battery staple'))
# NEVER store plaintext; always hash with a unique salt
Try it yourself
Why should systems hash passwords instead of storing plaintext?
Hashing protects real passwords if the database is stolen.
Multi-Factor Authentication (MFA)
20 minWhat you'll learn
- Understand authentication factors
- Learn MFA benefits
- Set up MFA
MFA requires two or more independent proofs: something you know (password), something you have (phone or security key), or something you are (fingerprint or face). Even if an attacker steals your password, they cannot log in without the second factor. Time-based one-time passwords (TOTP) and hardware keys are the strongest forms. Enabling MFA on your email is the single highest-impact security step you can take today, because email is the master key that resets passwords everywhere else.
Try it yourself
What are the three types of authentication factors?
Something you know, something you have, something you are.
Encryption Basics: Symmetric vs Asymmetric
26 minWhat you'll learn
- Understand encryption purpose
- Compare symmetric and asymmetric
- Use OpenSSL
Encryption turns readable plaintext into ciphertext using a key. Symmetric encryption uses ONE shared key — fast, and used by AES and ChaCha20. Asymmetric encryption uses a public/private key pair — slower, used by RSA and ECC; anyone can encrypt with the public key, but only the private key can decrypt. Real systems combine both: asymmetric keys securely exchange a symmetric session key, then fast symmetric encryption protects the actual data. This hybrid is how HTTPS, VPNs, and messaging apps work.
# Symmetric: encrypt a file with AES-256 openssl enc -aes-256-cbc -salt -in secret.txt -out secret.enc # Asymmetric: generate an RSA keypair openssl genpkey -algorithm RSA -out private.pem openssl rsa -pubout -in private.pem -out public.pem
Try it yourself
What is the main difference between symmetric and asymmetric encryption?
Symmetric uses one shared key; asymmetric uses a public/private keypair.
Network Security Fundamentals
24 minWhat you'll learn
- Understand network attack surface
- Learn port scanning
- Know defense-in-depth
Every open port is a door, and every service behind it is a potential entry point. Attackers scan networks to find open doors — SSH on 22, web on 80 and 443, databases on 3306. Defense-in-depth layers controls so one failure does not compromise everything: firewall, network segmentation, patching, monitoring, and least-privilege access. The golden rule is simple: close what you do not need, and require authentication on everything that must stay open.
# Discover open ports on a host (Nmap) nmap -sV 192.168.1.10 # Show your own listening services ss -tulpn # Test reachability of a port nc -zv 192.168.1.10 22
Try it yourself
Why are open ports considered attack surface?
Each open port exposes a service that could have exploitable vulnerabilities.
Firewalls: Your First Line of Defense
22 minWhat you'll learn
- Understand firewall types
- Learn basic rules
- Configure UFW
A firewall filters traffic based on rules — allow or block by IP, port, and protocol. Host-based firewalls (UFW on Linux, Windows Defender Firewall) protect a single machine; network firewalls protect entire segments. The principle of least privilege applies to rules: deny everything by default, then allow only what is necessary. A misconfigured firewall that blocks legitimate traffic is annoying, but an open firewall that allows everything is a breach waiting to happen.
# Enable UFW and set sane defaults (Ubuntu) sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow 22/tcp # SSH only sudo ufw allow 443/tcp # HTTPS sudo ufw enable sudo ufw status verbose
Try it yourself
What is the default-deny principle?
Block everything by default, then explicitly allow only required traffic.
Antivirus & Endpoint Detection (EDR)
22 minWhat you'll learn
- Understand signature vs behavior detection
- Know EDR capabilities
- Use ClamAV
Traditional antivirus matches files against known signatures — effective for known malware but blind to new threats. EDR (Endpoint Detection and Response) goes further: it continuously monitors behavior, detects anomalies, and lets responders investigate and isolate infected machines. Modern security favors behavior-based detection plus threat intelligence feeds. For a home Linux system, ClamAV provides free on-demand scanning; enterprise Windows and macOS use Defender or commercial EDR.
# Update virus definitions and scan a directory sudo freshclam clamscan -r /home/user/Downloads # Check running services for anomalies systemctl list-units --type=service --state=running
Try it yourself
What limitation of signature-based antivirus does EDR solve?
EDR detects novel or unknown malware by behavior, not just known signatures.
Patching & Updates: Why They Matter
20 minWhat you'll learn
- Understand patch importance
- Automate updates
- Know patch cycles
Most breaches exploit known vulnerabilities that already have patches — attackers simply scan for systems that have not updated. The WannaCry ransomware spread through a flaw that had a patch available months earlier. Patching is unglamorous but it is the highest-return security activity. Enable automatic security updates, prioritize internet-facing services, and patch within days, not months. Every day a critical patch is unapplied is a day attackers can walk through an open door.
# Update Debian/Ubuntu packages sudo apt update sudo apt upgrade -y # Enable automatic security updates sudo dpkg-reconfigure --priority=low unattended-upgrades
Try it yourself
Why do attackers still succeed with old vulnerabilities?
Because many systems never apply available patches, leaving known doors open.
Web Security & the OWASP Top 10
26 minWhat you'll learn
- Know common web attacks
- Understand SQL injection and XSS
- Learn the OWASP list
Web applications are a prime target. The OWASP Top 10 lists the most critical web risks, led by broken access control, cryptographic failures, injection, and insecure design. SQL injection lets attackers manipulate database queries; cross-site scripting (XSS) runs attacker JavaScript in victims' browsers. Defenses include parameterized queries, input validation, output encoding, and strong access controls. Understanding this list is the fastest way to build secure web apps.
# Vulnerable query (NEVER do this)
# query = f"SELECT * FROM users WHERE id = {user_input}"
# Safe parameterized query (Python + psycopg2)
cur.execute('SELECT * FROM users WHERE id = %s', (user_input,))
# Encode output to prevent XSS
from markupsafe import escape
safe = escape(user_supplied_text)
Try it yourself
What vulnerability allows an attacker to run their own SQL in your database?
SQL injection.
Wi-Fi & Wireless Security
22 minWhat you'll learn
- Secure home Wi-Fi
- Understand WPA2 vs WPA3
- Spot rogue access points
Wireless networks broadcast traffic through the air, so encryption is essential. WPA2-PSK is common but vulnerable to offline password cracking; WPA3 fixes key weaknesses with stronger handshakes. To secure a home network: use WPA2/WPA3 with a long passphrase, change default router credentials, disable WPS, and keep router firmware updated. Be wary of public Wi-Fi — anyone on the same network can attempt to intercept traffic, so use a VPN or avoid sensitive logins on open networks.
# Check Wi-Fi security (Linux, requires nmcli) nmcli -f SSID,SECURITY dev wifi list # Disable WPS on your router admin page # Use WPA3 if available, else WPA2 with a long passphrase
Try it yourself
Why is WPA3 better than WPA2?
WPA3 fixes WPA2 flaws that allowed offline password cracking of the handshake.
Backups & Data Recovery
22 minWhat you'll learn
- Design a backup strategy
- Understand the 3-2-1 rule
- Test restores
Backups are your last defense against ransomware, disk failure, and accidental deletion. The 3-2-1 rule: keep 3 copies of your data, on 2 different media types, with 1 copy offsite. Regular automatic backups, versioning, and — critically — tested restores are what separate a real plan from a wish. A backup you have never restored is not a backup. Ransomware specifically targets backups, so keep at least one copy offline or immutable.
# Full backup with rsync rsync -av --delete /home/user/data/ /mnt/backup/data/ # Offsite push to remote server rsync -av /mnt/backup/ user@remote:/backups/ # Verify by restoring a single file rsync -av /mnt/backup/data/report.pdf /tmp/restore-test/
Try it yourself
What is the 3-2-1 backup rule?
3 copies, 2 different media types, 1 offsite copy.
Physical Security
18 minWhat you'll learn
- Understand physical attack vectors
- Prevent shoulder surfing
- Secure devices
Physical security is often ignored but it is the foundation — if an attacker has physical access, most digital controls fall. Threats include tailgating through locked doors, shoulder surfing passwords, USB drop attacks (leaving malware-loaded drives), and device theft. Mitigations: lock screens, full-disk encryption, cable locks, privacy screens, and a clean-desk policy. Remember the rule: physical access equals game over unless the disk is encrypted.
# Enable full-disk encryption (Linux LUKS) sudo cryptsetup luksFormat /dev/sdb1 sudo cryptsetup open /dev/sdb1 backupdisk # Set a short screen-lock timeout gsettings set org.gnome.desktop.session idle-delay 300
Try it yourself
Why does full-disk encryption matter if a laptop is stolen?
It makes the stolen disk unreadable without the passphrase.
Security Policies & Acceptable Use
20 minWhat you'll learn
- Understand policy purpose
- Know common policy types
- Create basic rules
Security policies document what is allowed and what is required. An Acceptable Use Policy defines proper use of company systems; a password policy sets complexity and rotation rules; an incident response policy says who does what during a breach. Policies fail when they are vague, unenforced, or unknown to employees. Good policies are clear, realistic, and paired with training — because security is as much a people and process problem as a technical one.
Try it yourself
Why do security policies fail?
They are vague, unenforced, or unknown to the people who must follow them.
Incident Response: The Basics
24 minWhat you'll learn
- Know the IR lifecycle
- Understand detection and containment
- Learn post-incident review
Incident response is the plan for when (not if) something goes wrong. The lifecycle: Preparation, Detection and Analysis, Containment, Eradication, Recovery, and Post-Incident Activity. Speed matters — mean time to detect (MTTD) and mean time to respond (MTTR) are key metrics. A written playbook with assigned roles beats improvisation during a crisis. After any incident, a blameless post-mortem turns mistakes into stronger controls.
Try it yourself
What is the first action when a host is confirmed compromised?
Isolate it from the network (containment) while preserving evidence.
Ethical Hacking vs Malicious Hacking
22 minWhat you'll learn
- Distinguish hacker types
- Understand penetration testing
- Know legal boundaries
Hackers are classified by intent. White hats (ethical hackers) test systems with permission to find and fix flaws. Black hats attack without authorization for personal gain. Gray hats operate in between, sometimes finding flaws and disclosing them without asking. Penetration testing is the authorized, structured process of attacking your own systems to find weaknesses before criminals do. The golden rule: authorization is everything — the exact same technique is legal with permission and a crime without it.
Try it yourself
What makes a hacker 'white hat'?
They test systems with explicit authorization to improve security.
Privacy & Data Protection (GDPR)
22 minWhat you'll learn
- Understand personal data
- Know GDPR rights
- Apply data minimization
Privacy is about controlling how personal data is collected and used. GDPR (Europe) and similar laws give individuals rights: access their data, correct it, request deletion (right to be forgotten), and know how it is processed. Data minimization means collect only what you need and keep it only as long as necessary. Breaches are costly not just technically but legally — fines can reach millions. Privacy-by-design means building these principles into systems from the start, not bolting them on later.
Try it yourself
What does 'data minimization' mean?
Collect and retain only the personal data you actually need.
Cybersecurity Careers & Certifications
24 minWhat you'll learn
- Know security career paths
- Understand certifications
- Plan your learning path
Cybersecurity has many roles: Security Analyst (monitors alerts), Penetration Tester (attacks systems with permission), Security Engineer (builds defenses), Incident Responder (handles breaches), and GRC (governance, risk, compliance). Entry certifications include CompTIA Security+ for fundamentals, then specialized certs like CEH or OSCP for offensive work, CISSP for leadership, and cloud security certs. The field rewards continuous learning — start with networking and Linux fundamentals, then specialize.
Try it yourself
Which certification is the common entry point for security fundamentals?
CompTIA Security+.
You've completed all 20 lessons. Ready for more?
Continue to Cybersecurity Intermediate for network defense, penetration testing, and security operations.