Network traffic analysis is the art of reading the conversation between computers. Every packet tells a story - whether it's normal web browsing or a malware calling home to its C2 server. Understanding network traffic is essential for detecting attacks that logs might miss.
Think of network traffic like phone records. The logs tell you who called whom and for how long. But traffic analysis is like listening to the actual conversation. You can hear if someone is ordering pizza (normal) or negotiating a ransom (very bad).
Encrypted Traffic
Modern traffic is often encrypted (HTTPS, TLS). We can't see the content, but we CAN see metadata: who's talking to whom, when, how much data, and patterns. This metadata is still valuable!
Network Analysis Tools
tcpdump Basics
Wireshark Analysis
TShark for Automation
tshark is Wireshark for the command line. Perfect for scripting: tshark -r capture.pcap -Y 'http.request.method == POST' -T fields -e http.host -e http.request.uri
Identifying Suspicious Traffic
Zeek Network Logs
Brim for Fast Analysis
Brim (now Zui) is a desktop app that combines Zeek logs with Wireshark. Open a PCAP, it processes with Zeek, and you can search logs and drill down to packets. Much faster than Wireshark for large files!
DNS Traffic Analysis
HTTP Traffic Analysis
Investigation Example
Network Analysis Methodology
PCAP Analysis Workflow
1
OverviewGet file info, packet count, time range
2
StatisticsProtocol hierarchy, conversations, endpoints
3
DNS AnalysisCheck for tunneling, DGA, suspicious queries
4
HTTP AnalysisLook for downloads, C2, web shells
5
File ExtractionExport and hash transferred files
6
Pattern AnalysisLook for beaconing, lateral movement
7
DocumentRecord IOCs, timeline, findings
Knowledge Check
Challenges
Key Takeaways
- tcpdump captures packets; Wireshark analyzes them visually
- Zeek creates structured logs from PCAP - easier to search than packets
- C2 beaconing shows regular interval connections to same host
- DNS tunneling uses long subdomains and TXT records
- Even encrypted traffic reveals metadata: who, when, how much
- "Follow TCP Stream" reassembles conversations in Wireshark