If you want to be a hacker, you have to learn networking.
It’s that simple.
You can watch all the tutorials you want and download every tool on GitHub, but if you don't understand how data actually moves from point A to point B, you’re just clicking buttons without knowing why. You are acting like a script-kiddie.
As I said in The Ultimate "Dev-Native" Application Security Roadmap, networking is the first step to take in order to start your journey in cybersecurity.
Networking is the language computers use to talk. If you don't speak the language, you simply can't join the conversation—let alone change or manipulate it.
But here’s the trap: networking is absolutely massive.
If you blindly dive into it, you could easily spend years studying corporate infrastructure topologies and still feel completely lost, which is something that I did myself when I started.
So, how do you filter out the noise? How do you know what parts actually matter for an offensive security researcher and what parts are a complete waste of your time?
In this guide, I’m going to show you the exact networking roadmap you need to master to start hacking effectively. I will break down the foundational models layer by layer, give you the exact topics you need to research, and show you the real-world tools and attacks used at each stage.
The Big Picture: TCP/IP vs. The OSI Model
To keep everything organized, the tech industry relies on two main conceptual models: the TCP/IP stack and the OSI Model.
Now, to be completely honest with you, the real world running the live internet mostly uses TCP/IP. But if you are trying to learn networking from an engineering and hacking perspective, the OSI Model is better in the beginning. It breaks the entire process down into 7 layers.
Think of it like a sandwich. Every single layer adds a specific piece of critical information to your raw data. When you send a message, it gets wrapped in 'packets' or data units that travel down through these layers, across physical hardware, and back up the stack until they reach the target.
As a hacker, you must understand this whole process. You cannot find a vulnerability in a system if you don't know how its data flows. But depending on your specific goal—whether you want to focus heavily on web application hacking or corporate network pentesting—you might need to go incredibly deep in some layers and just know the bare basics in others.
So, Let's start.
Layer 1: The Physical Layer
Most beginners assume that hacking only happens through a terminal screen, but sometimes, the most devastating hacks start with a physical cable or a rogue radio wave. The golden rule of security is simple:
If an attacker can physically touch your hardware, it’s not just your computer anymore—it’s theirs.
As the name implies, Layer 1 is entirely about the physical infrastructure—the copper cables, fiber optics, radio frequencies, and the raw electricity pulsing through them. At this stage, concepts like "files," "websites," or "emails" do not exist. We are dealing strictly with bits—raw ones and zeros moving through.
You will also encounter legacy hardware here, like Hubs and Repeaters. A Hub is a fundamentally "dumb" device. When it receives data from one computer, it doesn't know who the data is actually meant for. It simply copies that data and broadcasts (screams) it out to every single device connected to it.
The Hacker's Perspective
Why do we care about physical attributes? Because if you have physical proximity or access, you gain a massive architectural advantage.
The Attack: Rogue Access Points & Hardware Tapping.
The Tooling: Hackers utilize hardware devices like the WiFi Pineapple. This is a rogue access point designed to mimic legitimate, trusted wireless networks. The moment an unsuspecting device connects to it, the attacker acts as a proxy and can view or manipulate their unencrypted traffic.
What to Study: Learn what hubs and repeaters are, copper vs. fiber capabilities, and basic wireless frequencies (802.11 standards).
Layer 2: The Data Link Layer
Once data leaves the physical cable and enters a network interface card, we need a way to ensure devices in the same room can talk to each other without screaming blindly like a Hub. If Layer 1 is the physical road, Layer 2 is how cars find the exact house on that local street.
Every single network card manufactured in the world comes with a permanent, unique identifier burned into its hardware called a MAC Address (Media Access Control). While an IP address changes depending on what network you connect to, your MAC address remains constant.
💡 Well, now there are apps and tools that you can actually change the MAC Address too, but for the sake of the roadmap and sources, we consider them constant.
At this layer, we use Switches. Unlike Hubs, Switches are "smart". They maintain an internal table (called the MAC Address Table) tracking which MAC address is plugged into which physical port, ensuring data is sent only to its intended recipient.
To make local communication seamless, networks use ARP (Address Resolution Protocol). ARP acts as a local translator, mapping dynamic IP addresses to static physical MAC addresses. ARP Protocol has its own standard flow, which, if you want to learn the attacks related to it (like ARP Spoofing), you have to read about.
The Hacker's Perspective
The flaw with Layer 2 protocols like ARP is that they are incredibly trusting. They were designed decades ago for speed, meaning they don't double-check or authenticate whether someone is lying about their identity.
The Attack: ARP Spoofing / Man-in-the-Middle (MITM).
The Tooling: Using tools like Bettercap or Ettercap, a hacker can send spoofed ARP responses out to the local network. You essentially tell the local computer: "Hey, I am the Internet Router!" while telling the actual router: "Hey, I am the Victim's computer!" Because both sides blindly trust your responses, all local traffic flows directly through your machine first. You are now a Man-in-the-Middle, capable of intercepting cleartext credentials, sessions, and messages.
What to Study: Master ARP mechanics, MAC address cloning, and how switches populate their CAM tables. Also, I recommend that you learn about the mitigations and defenses against those attacks.
Layer 3: The Network Layer
Layer 2 is phenomenal for attacking people sitting in the exact same room or local network as you. But what happens when you need to talk to a server located on the other side of the planet? Local MAC addresses cannot help you there. For that level of global communication, we need Layer 3: the layer that runs the entire internet.
The Concept
The core foundation of this layer is the IP Address (Internet Protocol), which acts as your digital home address on the global web. You need to understand both IPv4 (the traditional 32-bit dotted-decimal addresses like 192.168.1.1) and IPv6 (the longer, modern 128-bit hexadecimal addresses).
To move packets across networks, we use Routers. Routers act as the traffic controllers of the global internet. They perform a process called Routing, examining the destination IP of an incoming packet and determining the absolute best path for it to take across thousands of intermediary networks.
Three other major defensive and architectural concepts live here:
Firewalls: The security guards check incoming and outgoing packets based on predefined rulesets to block malicious traffic.
NAT (Network Address Translation): The technology allowing an entire household of devices to share a single public IP address provided by an ISP.
ICMP: The diagnostic protocol used to check connectivity statuses.
The Hacker's Perspective
Layer 3 is the ultimate place for Reconnaissance. If you are hired to target a corporation, you always start your active phase at Layer 3.
The Attack: Network Mapping and Infrastructure Recon.
The Tooling: We use Nmap to run network sweeps against target IP ranges to identify what servers are actually active and online. We also use Traceroute to track every single router "hop" our packets make before hitting the final destination, providing a literal blueprint of the target's network perimeter and filtering devices.
What to Study: Subnetting (CIDR notation), public vs. private IP spaces, routing protocols, and NAT mechanics.
Layer 4: The Transport Layer
Congrats. You’ve used Layer 3 to find a live public IP address belonging to your target. But simply finding the building doesn't mean you are inside. A single enterprise server can handle a hundred different tasks simultaneously—it can host a web application, run an email server, or manage database storage. How does the server know which specific program should receive your data? That is where Layer 4 comes in.
Layer 4 introduces the concept of Ports—which you can think of as logical "doors" into the operating system. Every IP address has exactly 65,535 available ports. By industry convention, specific services run on standardized doors: Port 80 handles unencrypted web traffic (HTTP), Port 443 handles secure web traffic (HTTPS), and Port 22 hosts secure remote shell access (SSH).
To transport this data, you must choose between two different protocols:
TCP (Transmission Control Protocol): The polite, reliable protocol. It forces a strict Three-Way Handshake (
SYN->SYN-ACK->ACK) before sending a single byte of real data. It guarantees that every single packet arrives safely and in the exact correct order.UDP (User Datagram Protocol): The chaotic, fast protocol. It completely skips the handshake. It simply fires packets at the target as fast as humanly possible. If packets drop off or get lost in transit, UDP doesn't care. This is why it's perfect for live video streaming, DNS queries, and online gaming, where speed matters more than perfection.
The Hacker's Perspective
Layer 4 hacking is entirely about finding unlocked doors or exploiting the services behind those doors.
The Attack: Port Scanning and Direct Network Connections.
The Tooling: We use Nmap to perform stealthy port scans (like SYN stealth scans) to see which of those 65,535 doors are wide open on a target server. Once an open port is discovered, hackers pull out Netcat—the "Swiss Army Knife" of hacking. Netcat allows you to send raw, custom data directly into a port, or bind an interactive operating system terminal shell to that port to seize control of the machine.
What to Study: Deep-dive into the TCP flag states (SYN, ACK, FIN, RST, PSH, URG), packet structures, tools like nmap, and the mechanics of TCP and UDP.
Layers 5 & 6: The Session & Presentation Layers
Now you have successfully identified a live server, located an open port, and initiated a direct communication channel. But what happens if that conversation needs to be strictly encrypted? Or what if the server sends back raw data formatted in a syntax your local program doesn't naturally speak? We group Layers 5 and 6 together because they govern how your data is formatted, translated, and maintained throughout a session.
Layer 5 (The Session Layer): Acts as the manager of the ongoing conversation. It establishes, maintains, and tears down communication channels between applications. When you authenticate to a platform, the Session layer ensures the connection stays alive and remembers who you are across various requests, so you don't have to provide your password every time you click a hyperlink.
Layer 6 (The Presentation Layer): Functions as the universal translator of the stack. It manages Encoding (converting raw data into manageable strings like Base64, Hex, or ASCII) and, crucially, Encryption/Decryption. This is where cryptographic suites like SSL/TLS operate—the tech that generates the secure lock icon in your URL bar and safeguards sensitive financial or personal records.
The Hacker's Perspective
If developers mess up session generation or rely on weak obfuscation instead of actual cryptography at these layers, hackers will tear the implementation apart.
The Attack: Session Hijacking and Cryptographic/Encoding Bypasses.
The Tooling: Hackers use tools like web developer suites or proxy extensions to conduct Session Hijacking. If an attacker steals your active session token or cookie, they can present it to a backend server. The server assumes it's talking to you, and the hacker bypasses the need for your username, password, or multi-factor authentication entirely. At Layer 6, hackers live inside tools like CyberChef to quickly decode Base64 or Hex strings. Lazy developers frequently encode database secrets or admin flags in Base64, thinking it is "secure," forgetting that encoding is a public translation standard, not encryption.
What to Study: Session state management, token generation, asymmetric vs. symmetric encryption fundamentals, and common serialization/encoding schemes.
Layer 7: The Application Layer
Finally, we reach the top floor of the building: the Application Layer. This is the user-facing interface that you interact with every single day. When you fire up Google Chrome, send an email via an IMAP client, or fetch updates on a smartphone app via an API, you are operating entirely in Layer 7.
This layer is dominated by a few key application protocols:
HTTP / HTTPS: Hypertext Transfer Protocol. The foundation of web browsing, determining exactly how clients request resources and how web servers deliver them.
DNS (Domain Name System): The phonebook of the internet. Computers only natively understand numerical IP addresses, but humans cannot memorize them. DNS maps human-readable domains (like
google.com) into computer-readable IPs.
Because modern enterprise applications receive massive global traffic, they don't sit exposed directly to the internet. Instead, they sit behind Proxies, Load Balancers, and CDNs (Content Delivery Networks) like Cloudflare, which filter, cache, and shield backend application servers from direct public interaction.
The Hacker's Perspective
Layer 7 is the goldmine for modern security researchers. This is where the majority of software logic bugs, authentication flaws, and high-paying vulnerabilities are discovered today.
The Attack: Web Application Vulnerabilities (SQLi, XSS, SSRF, IDOR, and Request Smuggling).
The Tooling: The king of Layer 7 is Burp Suite. Burp Suite acts as an intercepting proxy sitting directly between your web browser and the internet. It captures the outbound HTTP request before it leaves your machine, allowing you to manipulate parameters arbitrarily—such as altering a product's price variable inside an HTTP POST request from
$100down to$1—to see if the backend code validates input correctly. Hackers also deploy tools like FFUF or Dirsearch to fuzz web directories and look for forgotten, unlinked administrative configuration panels or source code backups. Advanced researchers can even execute attacks like HTTP Request Smuggling, sending malformed, mismatched HTTP headers to confuse front-end proxies and inject malicious payloads directly into concurrent user streams on the backend.What to Study: Web Protocols, HTTP request/response structural syntax, DNS record types, and ….
Your Execution List: Where to Start?
I get that this is lots of technical information to process at once. But as I mentioned at the start, you do not need to be a certified network engineer on day one to be an exceptional security tester. You just need a structured checklist of what to research right now. So read this roadmap again, research all those concepts and keywords I mentioned, and then you can skim the other networking courses like CompTIA Network+ to see if you’ve missed anything important.
Thanks for reading, stay secure, and I'll see you in the next one.
— Arian