By the end of this chapter you will be able to explain how computer networks work, describe IP addressing, subnets, DNS, TCP/UDP, ports, and protocols, understand the role of routers, switches, and firewalls, recognize common network attacks in logs, analyze basic packet captures, and detect behavioral anomalies like C2 beaconing and lateral movement.
A network is a group of computers and devices connected so they can communicate and share resources. Look around your home and list every device connected to your Wi-Fi — phone, laptop, TV, smart speaker. Each one is a node on a network. Enterprise environments contain thousands of them.
Nearly every security event involves network communication. Whether malware is spreading, a user is browsing the web, or an attacker is quietly exfiltrating data — the network carries the evidence. If cybersecurity is a crime scene, the network is the "streets and highways" where attackers travel.
Even if you never become a network engineer, understanding basic networking allows you to:
If Chapter 1 gave you the "landscape" of cybersecurity, this chapter gives you the roads and intersections that connect everything together.
Every device on a network needs a unique address so that data knows where to go. That address is the IP address — functioning exactly like a street address for a house. Two versions are in use today.
IPv4 addresses are 32-bit numbers written in four groups separated by dots. You will see these constantly in SOC investigations.
192.168.1.10 → employee laptop (internal)
8.8.8.8 → Google DNS (external)
185.44.21.90 → attacker IP (Tor exit node)
IPv6 addresses are 128-bit and written in hexadecimal groups. They are increasingly common in cloud environments and modern networks.
fe80::42a8:d2ff:fe74:587b
Private IPs are used inside an organization's network and are not routable on the internet. Public IPs are globally unique and appear in internet-facing communications.
| Range | Type | SOC Significance |
|---|---|---|
| 10.0.0.0/8 | Private | Internal corporate network |
| 172.16.0.0/12 | Private | Internal (often servers or VMs) |
| 192.168.0.0/16 | Private | Home / small office networks |
| Any other range | Public | Internet-routable — appears in external traffic |
SOC Insight: When you see a private IP communicating with an unusual external IP, that is a signal worth investigating. When you see a private IP communicating with another private IP on a different subnet, you may be looking at lateral movement.
Large organizations have thousands of devices — finance computers, developer laptops, servers, printers, cameras. Connecting all of them on one flat network is a massive security risk: if an attacker compromises a single device, they can potentially reach everything else.
The solution is to divide the network into smaller, isolated segments called subnets — short for subnetworks. A finance computer should not be able to reach a development server. A printer should not be able to reach a domain controller. Each subnet only communicates with others when the network is explicitly configured to allow it.
Subnets are described using CIDR notation — an IP address followed by a slash and a number indicating how many bits are used for the network portion.
192.168.1.0/24 → 256 total addresses (one subnet)
10.0.0.0/16 → 65,536 total addresses
10.10.5.0/24 → Finance department subnet
10.10.6.0/24 → Engineering subnet
When you see an alert, the subnet tells you the blast radius — how much damage is possible if this host is fully compromised.
All communication on a network travels as packets — small, discrete bundles of data. Think of the network like a postal system: instead of sending one enormous letter, you break it into hundreds of small envelopes, each addressed and numbered, then reassemble them at the destination.
Every packet has two main parts:
Network analysts and security tools inspect packet headers to detect malicious patterns, trace attacker communication, and confirm exfiltration attempts — even when payloads are encrypted.
Every network connection uses a protocol — a set of rules that devices follow to communicate. Two transport protocols handle most of the traffic you will see in SOC investigations: TCP and UDP. Understanding the difference explains why certain attacks use certain protocols and what traces they leave.
TCP is reliable. Before any data is sent, both sides perform a handshake to confirm the connection is established. Every packet sent is acknowledged; lost packets are retransmitted. Think of TCP like a certified letter — you get confirmation that it arrived.
Used for: web browsing (HTTP/HTTPS), email (SMTP), file transfers, SSH, RDP. Any time data integrity matters, TCP is used.
SOC Relevance: TCP handshakes appear in firewall logs. A flood of SYN packets with no completion = port scanning. A completed handshake to a suspicious IP = active connection to investigate.
UDP is fast but unreliable. There is no handshake, no acknowledgment, no guarantee packets arrive. Think of UDP like throwing flyers from a moving car — fast, but no confirmation anyone caught them.
Used for: DNS queries, streaming video, VoIP, gaming, NTP time synchronization.
SOC Relevance: Attackers use UDP because it is harder to track — no connection state means fewer log entries. DDoS attacks frequently use UDP floods. DNS tunneling (a C2 technique) travels over UDP port 53.
| Feature | TCP | UDP |
|---|---|---|
| Connection | Handshake required | Connectionless |
| Reliability | Guaranteed delivery | Best effort only |
| Speed | Slower (overhead) | Faster (no overhead) |
| Common uses | HTTP, HTTPS, SSH, RDP | DNS, VoIP, streaming |
| SOC alert signal | SYN flood, port scan | DNS tunneling, UDP flood |
Computers communicate using IP addresses, but humans prefer names. DNS (Domain Name System) is the service that translates human-readable domain names into IP addresses that computers can use.
www.google.com → 142.250.191.46
update-check.io → 91.22.15.88 ← suspicious domain
hf833hs9wj29.xyz → 185.44.22.1 ← DGA domain
Every device on the internet constantly makes DNS queries — including malware. This makes DNS one of the richest and most valuable data sources a SOC analyst has. If an endpoint is infected, its malware almost certainly uses DNS to communicate with the attacker's infrastructure.
If DNS is compromised or abused, attackers can redirect users to fake sites, hide C2 addresses inside normal-looking queries, and exfiltrate data in small encoded chunks — all through a protocol that many firewalls never block.
Every service on a network uses a specific port number. Ports are like apartment numbers inside a building — the IP address gets you to the building, the port gets you to the right service. SOC analysts must instantly recognize what a port number means when they see it in a log or alert.
| Protocol | Port | Purpose | SOC Threat Signal |
|---|---|---|---|
| DNS | 53 | Name resolution | DGA queries, DNS tunneling, C2 beaconing |
| HTTP | 80 | Unencrypted web traffic | Malware downloads, C2 (fully visible in logs) |
| HTTPS | 443 | Encrypted web traffic | C2 hidden in encryption; analyze TLS metadata |
| SMTP | 25 | Email sending between servers | Phishing infrastructure, spam relay |
| SSH | 22 | Encrypted remote shell access | Brute force, unauthorized remote access |
| RDP | 3389 | Windows remote desktop | Brute force, lateral movement, ransomware delivery |
| SMB | 445 | Windows file sharing | Lateral movement, ransomware propagation (WannaCry) |
| Kerberos | 88 | Windows authentication tickets | Kerberoasting, ticket forging, golden ticket attacks |
| LDAP | 389 | Active Directory queries | Reconnaissance, enumeration of AD structure |
| Non-standard | 4444, 8080, 1234 | Not assigned to services | C2 framework traffic (Metasploit default: 4444) |
When port 3389 appears in a firewall log from an external IP, that is RDP — a legitimate admin tool that attackers use to access compromised systems. When port 445 appears between internal workstations, that is SMB file-sharing — the protocol ransomware uses to spread. Knowing these combinations instantly tells you the type and likely intent of the traffic.
Non-standard ports are always worth examining. Legitimate services use assigned ports. Malware often uses random high-numbered ports (4444, 8080, 1337) to avoid detection by rules targeting known-malicious ports.
Traffic moving through a network passes through different types of devices, each playing a distinct role. Understanding what each device does helps you read logs correctly — a firewall log means traffic reached the network boundary, a switch log means something happened internally between devices, and a router log means traffic crossed between different networks.
A switch connects devices within the same network segment. It routes traffic using MAC addresses (hardware identifiers) rather than IP addresses. Think of a switch as the hallways inside an office building — it connects rooms on the same floor.
A router connects different networks — your office to the internet, or the finance subnet to the server subnet. It routes traffic using IP addresses. Think of a router as the highway on-ramps between cities.
A firewall controls what traffic is allowed into or out of the network based on rules. Rules specify which IPs, ports, and protocols are permitted. Think of a firewall as a security guard checking IDs at the building entrance — legitimate visitors pass, unknown ones are blocked.
Attackers are opportunistic — they probe for the easiest way in. A network with outdated software, unnecessary open services, and weak firewall rules is a fast target. Network hardening means systematically closing easy-access options so that even if an attacker finds one weakness, they hit resistance at every subsequent step.
As a SOC analyst you will not typically configure these settings yourself — that is the job of network and security engineers. But you need to recognize weak configurations when alerts surface them, because many successful attacks only succeeded because one of the items below was left unaddressed.
A well-hardened network limits an attacker's movement. Even if they breach the perimeter, they hit walls — isolated subnets, blocked ports, missing services to exploit.
A security zone is a group of systems that share the same trust level and the same rules. Typical zones are the internet-facing zone for public servers, the internal user zone, a restricted zone for sensitive data, and a management zone for administering devices. Traffic that crosses from one zone to another has to pass through a firewall that decides whether it is allowed. For an analyst, the zone tells you how alarming a connection is: a workstation talking to another workstation is ordinary, while a workstation reaching into the restricted zone deserves a look.
Zoning matters most for operational technology (OT) — the systems that run physical processes such as factory lines, power, water, and building controls. OT equipment is often old, hard to patch, and built for reliability instead of security, so it is kept in its own zone, away from the office network. When OT is attacked, the damage is physical: machines stop, or people get hurt. Any traffic from the office network into an OT zone should be rare and explainable.
802.1X makes a device prove who it is before the switch port or Wi-Fi network will pass any of its traffic. The device presents credentials or a certificate, a central authentication server checks them, and only then does the port open. This is what stops a visitor from plugging a laptop into a wall jack and landing on the internal network. A captive portal is the lighter version used for guests: the web page that appears on hotel or lobby Wi-Fi and asks you to accept terms or sign in before you get internet access. A captive portal identifies a guest. It does not make that guest trusted, so guest networks stay in their own zone.
Every security device will eventually crash, lose power, or get overloaded, and the design question is what happens to traffic when it does. Fail-open lets traffic keep flowing without inspection, which keeps the business running but leaves a gap. Fail-closed blocks traffic until the device recovers, which stays secure but causes an outage. Neither is always right: an inline IPS in front of a hospital system may be set to fail open, while a firewall protecting payment data is usually set to fail closed. If a tool that failed open goes down, assume you had no visibility for that window and say so in your notes.
Most enterprise employees today work remotely from networks the company does not control — home, coffee shops, hotel Wi-Fi. Without protection, any data transmitted on those networks could be intercepted. A VPN (Virtual Private Network) solves this by creating an encrypted tunnel between the employee's device and the company's network, so all traffic travels securely regardless of the physical location.
VPNs are extremely common in enterprise environments — which makes them extremely attractive to attackers. If an attacker steals a user's VPN credentials through phishing, password spraying, or purchasing leaked credentials on dark web markets, they don't need to breach any firewall. They log in through the front door with a valid username and password, and the network treats them as a legitimate remote employee from that point forward.
NAT (Network Address Translation) allows many internal devices to share a single public IP address. The router rewrites the source IP of outbound packets from the private internal address to the public one. This means firewall logs at the perimeter show only the public IP — you need to correlate with internal DHCP logs to identify which device inside the network made that connection.
VLAN (Virtual Local Area Network) creates logical network segments on the same physical hardware. VLANs are like building separate hallways inside the same office — even though devices share the same switch, they cannot communicate across VLAN boundaries without a router explicitly permitting it. SOC analysts see VLANs in subnet ranges and use them to assess whether cross-network communication is authorized.
A traditional VPN pulls remote users back into the company network so their traffic can be inspected there. That made sense when the applications lived in the office. Now most of them live in the cloud, so Security Service Edge (SSE) moves the inspection to the cloud instead. A remote user connects to the SSE provider, which checks who they are, checks the health of their device, filters their web traffic, and connects them only to the specific applications they are allowed to use. For the SOC, the practical change is where the logs come from: remote user activity shows up in the SSE provider's logs, not in the office firewall.
On a network you do not control, anyone positioned between you and your destination can read or change your traffic. This is an on-path attack (the older name is man-in-the-middle). A VPN defeats it by encrypting everything before it leaves the device.
IPsec is the protocol suite behind most site-to-site VPNs and many remote-access ones. It works at the network layer, so it protects all traffic between two points and not only web traffic. Three pieces are worth recognizing:
A known partner whose tunnel drops produces a handful of failures and then reconnects. Hundreds of failures from an address that is not a configured peer is someone probing the gateway.
When you need to analyze a suspicious file, you do not want to run it on your actual work machine. When you need to practice attacking and defending, you do not want to use live production systems. Virtualization solves this problem.
A virtual machine (VM) is a simulated computer running inside software on your real machine. It has its own operating system, files, and network connection, but it is completely isolated from the host. If malware runs inside the VM, your real computer is unaffected. You can take a snapshot before testing something dangerous and restore the machine to a clean state in seconds if anything goes wrong.
The software that creates and manages virtual machines is called a hypervisor. Common hypervisors include:
Building a home lab with VMs is one of the most effective ways to develop hands-on SOC skills before your first job. If you can run a SIEM, generate real alerts, and investigate them in your own lab, you will walk into every interview with a genuine story to tell.
In the previous sections we established that all network communication travels as packets. Wireshark is a tool that lets you capture those packets as they travel across the network and inspect their contents in detail. Think of it as a recording system for network conversations. When a SIEM alert says something suspicious is happening on the network, Wireshark lets you see exactly what was sent, when, between which devices — giving you the evidence you need to confirm or rule out a threat.
The file that stores a captured network recording is called a PCAP (Packet Capture). Wireshark opens PCAPs and lets you apply filters to focus on the traffic that matters.
| Filter | What It Shows |
|---|---|
dns | All DNS queries and responses — find C2 domains and DGA activity |
http | Unencrypted web traffic — see full URLs, downloads, malicious scripts |
ip.addr == 185.22.1.44 | All traffic to or from a specific IP — isolate attacker communication |
tcp.port == 4444 | Traffic on a suspicious non-standard port — Metasploit default |
tcp.flags.syn == 1 && tcp.flags.ack == 0 | SYN-only packets — identify port scanning activity |
SOC analysts use Wireshark to detect unusual outbound traffic, large data transfers, C2 beaconing patterns, and suspicious DNS behavior. Chapter 3 goes deeper into PCAP analysis and network investigation techniques.
Your job as a SOC analyst is not to monitor every packet — it is to recognize when something is different from what normally happens. Every network has a baseline: normal working hours, normal destinations, normal traffic volumes, normal protocols. Attackers disrupt that baseline in predictable ways.
The behaviors below are not proof of an attack on their own, but each one should prompt a question: why is this happening, and does it have a legitimate explanation? If there is no good answer, that is your signal to dig deeper.
Understanding "normal" network behavior is the prerequisite for spotting "abnormal." Building that baseline intuition takes time — but every chapter in this course adds context that makes anomalies easier to recognize.
In Chapter 1, a SOC analyst received an impossible travel alert — a successful login from Texas at 10:02 AM followed by another from Germany at 10:05 AM. The alert said something was wrong, but it didn't say how. That answer lives in the network.
Step 1 — Firewall Logs: The analyst pulls firewall logs for the German IP (185.44.21.90) and finds it belongs to a Tor exit node — an anonymization network commonly used to mask attacker locations. The IP was not on any blocklist at the time of the login, which is why the firewall allowed the connection.
Step 2 — DNS Logs: DNS logs show the compromised account's workstation made repeated queries to update-check.io — a domain registered three days earlier with no legitimate business purpose. The query interval is exactly 60 seconds — consistent with C2 beaconing.
Step 3 — Subnet Analysis: The workstation belongs to the 10.10.5.0/24 finance subnet. Firewall logs show SMB traffic (port 445) from that workstation to three other hosts on the same subnet — early signs of lateral movement.
This is how networking fundamentals become SOC skills.
→ The IP address told us geography.
→ The subnet told us blast radius.
→ The DNS logs revealed the C2 channel.
→ The firewall logs revealed the attacker's next move.
None of this analysis required reading the encrypted content of a single packet. All of it came from protocol metadata, IP addresses, port numbers, and query patterns — the network-layer artifacts that every firewall, router, and DNS server records automatically.
Scenario: A workstation in the finance department — WS-FIN-04 (10.10.5.44) — is generating outbound traffic to an IP address in a foreign country every 30 seconds. The traffic is small — only a few hundred bytes each time — and uses HTTPS (port 443). The destination IP has no record in threat intelligence feeds. The behavior started at 11:47 PM last night and is still ongoing.
Your tasks:
This chapter covered the networking concepts SOC analysts rely on every day — IP addressing, subnets, DNS, TCP/UDP, protocols, firewalls, VPNs, packet capture, and behavioral anomalies that indicate malicious network activity.
A free account saves your progress and adds 50 flashcards, a 10-question sample practice exam with answer review, a Log Lab exercise and a case study.
CREATE A FREE ACCOUNT →Terms used here are defined in the security glossary. The full course has 29 chapters and follows the CompTIA Security+ SY0-801 objectives.
CyberStudyLabs is a CompTIA Delivery Partner. Our training materials are developed by CyberStudyLabs and aligned with the objectives validated by CompTIA Security+® (SY0-701).