// Chapter 2 of 29 · Phase 1 — Foundations

Networking for SOC Analysts

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.

In this chapter
  1. 1. Why Networking Matters for SOC Analysts
  2. 2. IP Addresses: The Home Addresses of the Internet
  3. 3. Subnets and Why They Matter
  4. 4. Packets: How Data Moves
  5. 5. TCP vs UDP: The Two Main Ways Data Travels
  6. 6. DNS: The Phone Book of the Internet
  7. 7. Common Protocols SOC Analysts Must Recognize
  8. 8. Routers, Switches, and Firewalls
  9. 9. Network Hardening Basics
  10. 10. VPNs and Why Attackers Target Them
  11. 11. Virtualization Basics for SOC Analysts
  12. 12. Packet Analysis Basics (Wireshark)
  13. 13. Detecting Anomalies in Network Traffic
  14. Real-World Example: Tracing a Login Through the Network
  15. Mini Quiz
  16. Case Study: Beaconing from the Finance Workstation

1. Why Networking Matters for SOC Analysts

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.

2. IP Addresses: The Home Addresses of the Internet

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 — The Most Common

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 — The Newer Standard

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 vs Public IP Ranges

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.

RangeTypeSOC Significance
10.0.0.0/8PrivateInternal corporate network
172.16.0.0/12PrivateInternal (often servers or VMs)
192.168.0.0/16PrivateHome / small office networks
Any other rangePublicInternet-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.

3. Subnets and Why They Matter

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.

CIDR Notation

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

SOC Use Cases for Subnets

When you see an alert, the subnet tells you the blast radius — how much damage is possible if this host is fully compromised.

4. Packets: How Data Moves

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:

Anatomy of a Packet
HEADER (always visible)
Src IP: 10.10.5.22
Dst IP: 185.44.21.90
Protocol: TCP
Src Port: 52341
Dst Port: 443
PAYLOAD (encrypted if HTTPS)
[ TLS encrypted data ]
Content hidden — but header
still reveals: who, where, when
Even when a packet is fully encrypted, the header tells a SOC analyst the source, destination, protocol, and port. This is how C2 beaconing is detected — not by reading the content, but by recognizing the pattern.

Network analysts and security tools inspect packet headers to detect malicious patterns, trace attacker communication, and confirm exfiltration attempts — even when payloads are encrypted.

5. TCP vs UDP: The Two Main Ways Data Travels

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 — Transmission Control Protocol

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.

1
SYN — Client sends "I want to connect" (synchronize)
2
SYN/ACK — Server replies "I'm ready, and I got your message"
3
ACK — Client confirms "Connection established"

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 — User Datagram Protocol

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.

FeatureTCPUDP
ConnectionHandshake requiredConnectionless
ReliabilityGuaranteed deliveryBest effort only
SpeedSlower (overhead)Faster (no overhead)
Common usesHTTP, HTTPS, SSH, RDPDNS, VoIP, streaming
SOC alert signalSYN flood, port scanDNS tunneling, UDP flood

6. DNS: The Phone Book of the Internet

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.

What SOC Analysts Look For in DNS Logs

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.

7. Common Protocols SOC Analysts Must Recognize

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.

ProtocolPortPurposeSOC Threat Signal
DNS53Name resolutionDGA queries, DNS tunneling, C2 beaconing
HTTP80Unencrypted web trafficMalware downloads, C2 (fully visible in logs)
HTTPS443Encrypted web trafficC2 hidden in encryption; analyze TLS metadata
SMTP25Email sending between serversPhishing infrastructure, spam relay
SSH22Encrypted remote shell accessBrute force, unauthorized remote access
RDP3389Windows remote desktopBrute force, lateral movement, ransomware delivery
SMB445Windows file sharingLateral movement, ransomware propagation (WannaCry)
Kerberos88Windows authentication ticketsKerberoasting, ticket forging, golden ticket attacks
LDAP389Active Directory queriesReconnaissance, enumeration of AD structure
Non-standard4444, 8080, 1234Not assigned to servicesC2 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.

8. Routers, Switches, and Firewalls

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.

Switch — Internal Traffic Director

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.

Router — Inter-Network Traffic Director

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.

Firewall — Security Guard at the Border

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.

Network Topology — Traffic Flow
🌐 Internet
External attacker IPs, C2 servers, threat infrastructure
↓ inbound / outbound traffic ↓
🔀 Router
Routes traffic between internet and internal network
↓
🛡️ Firewall
Allows/blocks traffic based on IP, port, protocol rules
↓ permitted traffic only ↓
🔌 Switch
Finance subnet 10.10.5.0/24
🔌 Switch
Engineering subnet 10.10.6.0/24
🔌 Switch
Server zone 10.10.1.0/24
Each subnet is isolated — a compromised finance workstation should not be able to reach engineering servers. When it does, that cross-subnet traffic is a lateral movement signal for the SOC.

9. Network Hardening Basics

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.

Common Weak Configurations a SOC Analyst Should Recognize

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.

Security Zones

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.

Controlling Who Can Plug In: 802.1X and Captive Portals

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.

Failure Modes: Fail-Open and Fail-Closed

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.

10. VPNs and Why Attackers Target Them

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.

SOC Indicators of VPN Compromise

NAT and VLAN — Two More Network Concepts SOC Analysts Encounter

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.

Beyond the VPN: Security Service Edge (SSE)

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.

IPsec and the On-Path Attack It Prevents

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:

What an IPsec Problem Looks Like in Logs

02:11:07 vpn-gw01 IKE negotiation failed peer=203.0.113.77 reason=no proposal chosen
02:11:09 vpn-gw01 IKE negotiation failed peer=203.0.113.77 reason=no proposal chosen
02:11:12 vpn-gw01 IKE negotiation failed peer=203.0.113.77 reason=authentication failed
02:11:12 vpn-gw01 412 failed negotiations from peer=203.0.113.77 in 5 minutes

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.

11. Virtualization Basics for SOC Analysts

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:

How SOC Analysts Use Virtual Machines

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.

12. Packet Analysis Basics (Wireshark)

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.

Example Wireshark View

No.    Source          Destination     Protocol   Info
1      192.168.1.10    8.8.8.8         DNS         Standard query: www.google.com
2      8.8.8.8         192.168.1.10    DNS         Response: 142.250.191.46
3      192.168.1.10    142.250.191.46   TCP         SYN
4      142.250.191.46   192.168.1.10    TCP         SYN/ACK
5      192.168.1.10    91.22.15.88     DNS         Query: hf833hs9wj29.bad-domain.xyz ← suspicious
6      192.168.1.10    91.22.15.88     TCP         SYN → port 443 (non-standard dest)
7      192.168.1.10    91.22.15.88     TCP         [60 seconds later] SYN → port 443
8      192.168.1.10    91.22.15.88     TCP         [60 seconds later] SYN → port 443 ← beaconing

Essential Wireshark Filters for SOC Analysts

FilterWhat It Shows
dnsAll DNS queries and responses — find C2 domains and DGA activity
httpUnencrypted web traffic — see full URLs, downloads, malicious scripts
ip.addr == 185.22.1.44All traffic to or from a specific IP — isolate attacker communication
tcp.port == 4444Traffic on a suspicious non-standard port — Metasploit default
tcp.flags.syn == 1 && tcp.flags.ack == 0SYN-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.

13. Detecting Anomalies in Network Traffic

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.

Suspicious Network Behaviors

Network Diagram — Where SOC Analysts Look
INTERNET │ ┌─────┴──────┐ │ Router │ ← C2 traffic exits here └─────┬──────┘ │ ┌──────┴───────┐ │ Firewall │ ← blocked threats logged here └──────┬───────┘ │ ┌────────────────┼────────────────┐ │ │ │ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐ │ Finance │ │ Eng. │ │ Servers │ │10.10.5.x│ │10.10.6.x│ │10.10.1.x│ └────┬────┘ └─────────┘ └─────────┘ │ WS-FIN-04 ← compromised workstation beaconing every 30s to 91.22.15.88
The network diagram shows where each type of evidence lives. Firewall logs catch the beaconing at the perimeter. Router logs confirm the traffic crossed into the internet. Switch logs reveal whether the workstation tried to move laterally to other subnets.

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.

Real-World Example: Tracing a Login Through the Network

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.

Mini Quiz

Q1What protocol is used for reliable communication and requires a three-way handshake?
Q2Which port is commonly used for HTTPS traffic?
Q3What does DNS do, and why do SOC analysts monitor it closely?
Q4Give two examples of suspicious network behavior a SOC analyst should investigate.
Q5What is the purpose of a firewall, and what is its key limitation?

Case Study: Beaconing from the Finance Workstation

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:

  • Explain what "beaconing" is and whether this traffic matches the pattern
  • Identify three logs or tools you would check first
  • Describe whether this should be escalated and at what tier
  • Suggest an immediate next step (isolation, EDR check, or other)

Key Points

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.

This is chapter 2 of 29

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 →
← Chapter 1: Cybersecurity & SOC FoundationsChapter 3: Network Security, Traffic Analysis & PCAP →

Terms used here are defined in the security glossary. The full course has 29 chapters and follows the CompTIA Security+ SY0-801 objectives.

CompTIA Delivery Partner

CyberStudyLabs is a CompTIA Delivery Partner. Our training materials are developed by CyberStudyLabs and aligned with the objectives validated by CompTIA Security+® (SY0-701).