26

Chapter 26: Hacking Fundamentals Part 2

Deep Dive: Networking, OS Architecture, and Cryptography

What You'll Learn:

  • The OSI Model: How the internet actually works
  • OS Architecture: Kernel vs User Space
  • Cryptography: Encryption, Hashing, and why they matter
  • Web Architecture: How browsers talk to servers

1. Networking: The OSI Model

To hack a network, you must understand how data moves. The OSI Model breaks this down into 7 layers.

Layer 7: Application

What you see. HTTP (Web), SMTP (Email), FTP (Files).
Attack Vector: SQL Injection, XSS, Phishing.

Layer 4: Transport

How data is sent. TCP (Reliable) vs UDP (Fast).
Attack Vector: Port Scanning, DoS, SYN Flood.

Layer 3: Network

Addressing and Routing. IP Addresses.
Attack Vector: IP Spoofing, Man-in-the-Middle.

Layer 2: Data Link

Physical addressing. MAC Addresses.
Attack Vector: MAC Spoofing, ARP Poisoning.

2. OS Architecture: Kernel vs User Space

Your Operating System isn't just one big program. It's divided into two main rings of power.

The Kernel (Ring 0)

The heart of the OS. It has complete control over everything (CPU, RAM, Hardware).
Danger: If the kernel crashes, the whole computer crashes (Blue Screen).
Hacking: Kernel exploits (Rootkits) give you God-mode access.

User Space (Ring 3)

Where your apps run (Chrome, Discord, Games).
Safety: Apps can't touch hardware directly. They must ask the Kernel nicely (System Calls).
Hacking: Most malware runs here. Easier to detect and remove.

3. Cryptography Basics

Cryptography is the art of writing secret codes. In hacking, it's about breaking them.

Encryption (Two-Way)

Scrambling data so only someone with a key can read it.
Symmetric: Same key locks and unlocks (Fast, like a house key).
Asymmetric: Public key locks, Private key unlocks (Secure, like SSL/HTTPS).

Hashing (One-Way)

Turning data into a unique fingerprint. You CANNOT turn a hash back into data.
Use Case: Storing passwords. You don't save "password123", you save its hash.
Hacking: You can't "decrypt" a hash. You have to guess the password, hash it, and see if it matches (Brute Force).

🎯 Chapter 26 Mastery Checklist

☐ I can explain the 7 layers of the OSI Model
☐ I understand the difference between Kernel Mode and User Mode
☐ I know the difference between Encryption and Hashing
☐ I understand why ARP Poisoning works (Layer 2 attack)

✅ Level Up!

Congratulations! You now understand the invisible systems that hackers exploit.

Next up: Back to Roadmap

← PREVIOUS
Chapter 25
NEXT →
Roadmap