By the end of this chapter you will be able to analyze raw network traffic using Wireshark and PCAP files, distinguish north-south from east-west traffic, interpret DNS as a SOC data source, identify C2 beaconing patterns, read TLS handshake metadata, detect port scanning and lateral movement signatures, and recognize data exfiltration behavior in network logs.
Chapter 2 gave you the vocabulary of networking — packets, IP addresses, ports, protocols, DNS, TCP/UDP. This chapter is where that vocabulary becomes a skill. A SOC analyst does not just know what DNS is — they know what malicious DNS looks like. They don't just know what TCP is — they know what a port scan looks like in Wireshark.
Network analysis is one of the most powerful investigation techniques available to a SOC analyst because networks leave traces that are very difficult to fake. An attacker can delete logs from a compromised host — but they cannot erase packet captures that were recorded at the network perimeter. Even when traffic is encrypted, the metadata tells a detailed story.
This chapter teaches you how to read that story. By the end, you will be able to look at a PCAP file or a firewall log and know what to look for, what questions to ask, and what constitutes evidence.
When SOC analysts talk about "analyzing network traffic," they mean two different things depending on the depth of investigation. Understanding the difference helps you know which tool to reach for.
Packet analysis means capturing and inspecting every single byte of every packet — headers and payload. The tool for this is Wireshark, working with files called PCAPs (Packet Captures). Packet analysis gives you the full picture: exact content, timestamps, sequence numbers, flags — everything.
Flow analysis (also called NetFlow or IPFIX) summarizes conversations between hosts — who talked to who, for how long, how many bytes transferred — without storing the actual content. Think of it as a phone bill rather than a recording of the call.
| Feature | Packet Analysis (PCAP) | Flow Analysis (NetFlow) |
|---|---|---|
| Data captured | Full headers + payload | Summary metadata only |
| Storage requirement | Very high | Low |
| What you can see | Full content (if unencrypted) | Who, when, volume, direction |
| Primary tools | Wireshark, Zeek, Suricata | SolarWinds, Stealthwatch, SIEM |
| Best use case | Deep investigation, malware analysis | Continuous monitoring, hunting |
Every packet in your network is either crossing the perimeter or moving around inside it. This distinction is critical in SOC work because it determines which tools can see the traffic, what the traffic means, and how dangerous it is.
North-south traffic flows between your internal network and the internet. A user opening a web browser, malware calling home to a C2 server, an attacker logging in via VPN — all north-south. This traffic passes through your firewall, proxy, and perimeter tools, so it is the most visible.
East-west traffic flows between devices within the internal network — workstation to server, one VM to another, one department's subnet to another's. Historically this traffic was trusted and often invisible. This is exactly why attackers exploit it for lateral movement.
If you could only have one network log source for threat hunting and investigation, most experienced SOC analysts would choose DNS. Here is why: every internet-connected device, including every piece of malware, uses DNS. An attacker can tunnel their C2 through HTTPS on port 443. They can encrypt their payload. They can use legitimate cloud infrastructure. But they almost always need to resolve a domain name first — and that query goes into your DNS logs.
DNS logs answer questions no other log source can match:
| Pattern | What It Means | SOC Action |
|---|---|---|
| Queries every 30–60 seconds to same domain | C2 beaconing — malware checking in | Isolate host, investigate process making queries |
| Random-looking subdomain strings (DGA) | Domain Generation Algorithm — malware evading blocklists | Block TLD, search for other hosts with same pattern |
| Unusually long subdomain (100+ chars) | DNS tunneling — data encoded in query string | Capture PCAP, inspect payload encoding |
| Domain registered less than 30 days ago | Attacker infrastructure — fresh domains evade reputation feeds | Check WHOIS, correlate with other IOCs |
| Queries to non-corporate DNS servers | Malware bypassing corporate DNS filtering | Block unauthorized DNS servers at firewall |
| Sudden spike in NXDOMAIN responses | DGA activity — most generated domains don't resolve | Extract query patterns, sandbox the host |
DNS tunneling deserves special attention. Attackers encode data inside DNS query strings — the query itself becomes the exfiltration channel. Since DNS queries travel over UDP port 53 and are rarely blocked outbound, this is a reliable way to bypass firewall restrictions. The tell: DNS queries that are abnormally long, contain base64-encoded strings, or have high query volume to one domain without corresponding web traffic.
DNS servers remember recent answers so they do not have to look them up again. In cache poisoning, an attacker slips a false answer into that memory, so everyone who asks that server for a legitimate domain is sent to the attacker's IP address instead. The user typed the right address and still landed on the wrong site. The tell is a well-known domain suddenly resolving to an unfamiliar IP, especially when other DNS servers still return the normal one. DNSSEC, which lets servers verify that an answer is authentic, is the main defense.
A common misconception among new SOC analysts: "If traffic is encrypted, we can't see anything useful." This is wrong, and understanding why will change how you approach network investigations.
When two machines establish a TLS (HTTPS) connection, they perform a handshake before any encrypted data is exchanged. That handshake happens partly in cleartext, and it contains valuable information even when you cannot read the payload.
When two systems connect, they negotiate which version of a protocol and which encryption to use. In a protocol downgrade attack, an attacker sitting between them interferes with that negotiation so both sides settle on an old, weak option the attacker already knows how to break. The connection still looks encrypted to the user. In TLS metadata, the sign is a session using an outdated version or a weak cipher when both sides are capable of better. The fix is to disable old versions entirely so there is nothing to fall back to.
The remaining 7 lessons, the mini quiz and the case study for this chapter are free with an account, along with 50 flashcards and a 10-question sample practice exam.
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).