# Packet Analysis with Wireshark

> Capture and dissect network traffic with Wireshark and tcpdump to troubleshoot, investigate incidents and see protocols for real. Free notes, key concepts,...

Canonical: https://www.internhack.in/roadmaps/tracks/cybersecurity/wireshark
Last updated: 2026-11-28

Capture and dissect network traffic with Wireshark and tcpdump to troubleshoot, investigate incidents and see protocols for real.

Intermediate · about 8 hours · difficulty 3/5

Learn first: [DNS and How It Gets Abused](https://www.internhack.in/roadmaps/tracks/cybersecurity/dns), [TLS and Encryption in Transit](https://www.internhack.in/roadmaps/tracks/cybersecurity/tls)

Packets do not lie. **Wireshark** lets you see exactly what crossed the wire, which makes it essential for SOC analysts, incident responders and network engineers alike.

### Capturing

- Wireshark captures on an interface you choose; on servers use `tcpdump -i eth0 -w capture.pcap` and open the file later.
- **Capture filters** (BPF syntax, like `port 53`) limit what is recorded. **Display filters** (like `http.request` or `ip.addr == 10.0.0.5`) narrow what you view.
- Only capture on networks you own or are authorized to monitor; packet data can contain passwords and personal information.

### Analyzing

- **Follow TCP stream** reconstructs a conversation.
- **Statistics > Conversations** and **Protocol Hierarchy** quickly show who talked to whom and how much.
- **File > Export Objects > HTTP** recovers files transferred in cleartext.
- Useful filters: `dns`, `tcp.flags.syn == 1 && tcp.flags.ack == 0` (connection attempts, great for spotting scans), `http.request.method == "POST"`, `tls.handshake.type == 1` (Client Hello, shows SNI).

### What to look for in an investigation

Many SYNs to many ports (scanning), beaconing at regular intervals (possible C2), cleartext credentials (FTP, Telnet, HTTP basic auth), unusual DNS, or large outbound transfers.

### Pitfalls

- Opening a giant capture with no plan. Start with Statistics, then filter.
- Expecting to read HTTPS payloads; without keys you mostly see metadata.

Move on when you can take a sample malware-traffic pcap and identify the infected host, the suspicious domains and the timeline of events.

## Key concepts

- **Capture vs display filters**
- **tcpdump on servers**
- **Follow TCP stream**
- **Statistics: conversations and hierarchy**
- **Exporting objects from pcaps**
- **Spotting scans and beaconing**
- **Decrypting TLS with key logs**

## Mini project

Capture your own browsing for five minutes, then write a short report listing the domains contacted, protocols used and any cleartext traffic you found.

## Check yourself

Which display filter would you use to list only new TCP connection attempts, and why does that help find a port scan?

## Free resources

- [Wireshark documentation](https://www.wireshark.org/docs/) (Wireshark)
- [Malware-Traffic-Analysis.net exercises](https://www.malware-traffic-analysis.net/) (Brad Duncan)
- [tcpdump and libpcap](https://www.tcpdump.org/) (tcpdump.org)

Previous: [TLS and Encryption in Transit](https://www.internhack.in/roadmaps/tracks/cybersecurity/tls) · Next: [Python for Security](https://www.internhack.in/roadmaps/tracks/cybersecurity/python-basics)

## More in Networking for Security

- [How the Internet and TCP/IP Work](https://www.internhack.in/roadmaps/tracks/cybersecurity/internet-basics)
- [Subnetting, Ports and Common Services](https://www.internhack.in/roadmaps/tracks/cybersecurity/subnetting-ports)
- [DNS and How It Gets Abused](https://www.internhack.in/roadmaps/tracks/cybersecurity/dns)
- [HTTP for Security Work](https://www.internhack.in/roadmaps/tracks/cybersecurity/http)
- [TLS and Encryption in Transit](https://www.internhack.in/roadmaps/tracks/cybersecurity/tls)
- [Packet Analysis with Wireshark](https://www.internhack.in/roadmaps/tracks/cybersecurity/wireshark)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Cybersecurity Roadmap](https://www.internhack.in/roadmaps/tracks/cybersecurity)
