// Chapter 3 of 29 · Phase 1 — Foundations

Network Security, Traffic Analysis & PCAP

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.

In this chapter
  1. 1. From Network Basics to Network Investigation
  2. 2. Packet Analysis vs Flow Analysis
  3. 3. North-South vs East-West Traffic
  4. 4. DNS as the #1 SOC Data Source
  5. 5. Reading TLS Metadata — Seeing Through Encryption
  6. 🔒 6. Detecting C2 Beaconing
  7. 🔒 7. Port Scanning and Reconnaissance Signatures
  8. 🔒 8. Lateral Movement in Network Logs
  9. 🔒 9. Detecting Data Exfiltration
  10. 🔒 10. Wireshark Investigation Workflow
  11. 🔒 11. Zeek (Bro) — Network Security Monitoring
  12. 🔒 12. IDS/IPS Alerts and Suricata
  13. 🔒 Real-World Example: PCAP Investigation
  14. 🔒 Mini Quiz
  15. 🔒 Case Study: Exfiltration Hidden in Plain Sight

1. From Network Basics to Network Investigation

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.

// SOC Relevance
When a SIEM alert fires, the first question is always: is this real? Network evidence is often what converts a suspicious alert into a confirmed incident — or closes it as a false positive.

2. Packet Analysis vs Flow Analysis

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 — Full Depth

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 — Summary View

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.

FeaturePacket Analysis (PCAP)Flow Analysis (NetFlow)
Data capturedFull headers + payloadSummary metadata only
Storage requirementVery highLow
What you can seeFull content (if unencrypted)Who, when, volume, direction
Primary toolsWireshark, Zeek, SuricataSolarWinds, Stealthwatch, SIEM
Best use caseDeep investigation, malware analysisContinuous monitoring, hunting

3. North-South vs East-West Traffic

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 — Crosses the Perimeter

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 — Moves Inside the Network

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.

North-South vs East-West Traffic
↕ NORTH-SOUTH ↕ (crosses perimeter — visible to firewall/IDS) │ ┌─────┴───────┐ │ Firewall │ └─────┬───────┘ │ ┌─────┴──────────────────────────────────┐ │ INTERNAL NETWORK │ │ [Finance]───────[Engineering] │ │ │ ← EAST-WEST → │ │ │ [Servers]─────────────[HR] │ │ (lateral movement travels here) │ └─────────────────────────────────────────┘
A mature SOC monitors both directions. Many organizations only have north-south visibility, which is why attackers spend weeks moving east-west undetected after initial access.

4. DNS as the #1 SOC Data Source

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:

What Malicious DNS Looks Like

PatternWhat It MeansSOC Action
Queries every 30–60 seconds to same domainC2 beaconing — malware checking inIsolate host, investigate process making queries
Random-looking subdomain strings (DGA)Domain Generation Algorithm — malware evading blocklistsBlock TLD, search for other hosts with same pattern
Unusually long subdomain (100+ chars)DNS tunneling — data encoded in query stringCapture PCAP, inspect payload encoding
Domain registered less than 30 days agoAttacker infrastructure — fresh domains evade reputation feedsCheck WHOIS, correlate with other IOCs
Queries to non-corporate DNS serversMalware bypassing corporate DNS filteringBlock unauthorized DNS servers at firewall
Sudden spike in NXDOMAIN responsesDGA activity — most generated domains don't resolveExtract 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 Cache Poisoning

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.

5. Reading TLS Metadata — Seeing Through Encryption

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.

TLS Handshake Metadata Available to SOC Analysts

TLS Handshake — What Stays Visible
→ ClientHello [VISIBLE IN CLEARTEXT]
SNI: suspicious-update.io
JA3: 51c64c77e60f3980eea90869b68c58a8 ← matches CobaltStrike
Cipher suites, extensions (fingerprinted)
← ServerHello [VISIBLE IN CLEARTEXT]
Certificate CN: *.suspicious-update.io
Issued by: Let's Encrypt (registered 2 days ago)
JA3S: fingerprint of C2 server software
↕ [Encrypted payload — hidden from view]
But timing + volume patterns still visible
Even without decrypting a single byte, TLS metadata reveals the destination domain, the software making the connection, and characteristics of the server — enough to detect most C2 frameworks.

Protocol Downgrade Attacks

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.

Keep reading Chapter 3

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 →
← Chapter 2: Networking for SOC AnalystsSecurity glossary →

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).