Security tools · Lesson 12 of 14
Wireshark: your first packet capture
Learn Wireshark step by step: capture your own traffic, use display filters, read packet details and follow a stream. Practise on a simulated capture.
⏱ 20 min🎯 Beginner🧪 Hands-on practice🎬 Video
By the end, you’ll be able to…
- Capture traffic on your own device and stop the capture
- Use display filters to find DNS, HTTP and TLS traffic
- Read the source, destination, protocol and info columns of a packet
Key words
- Packet capture (pcap)
- A file that records network packets so you can study them later.
- Interface
- A network connection on your device, like Wi-Fi or Ethernet.
- Display filter
- A rule that hides packets you don’t care about, like dns or ip.addr == 192.168.1.5.
- Capture filter
- A rule that decides which packets are recorded at all.
- Stream
- All the packets in one conversation between two programs.
What Wireshark does
Wireshark is a free, open-source packet analyser. It records the packets your device sends and receives, then decodes them into readable layers: Ethernet, IP, TCP, then the application protocol. It’s used by network engineers, defenders and students everywhere, because it shows you what’s really happening instead of what you think is happening.
Your first capture
- Install Wireshark from the official download page. On Windows it will offer to install Npcap, which it needs to capture.
- Open it. You’ll see a list of interfaces with little activity graphs. Double-click the one that’s moving, usually Wi-Fi or Ethernet.
- Open a browser and visit
http://example.com(plain HTTP, on purpose, so you can read it). - Click the red square to stop the capture.
You’ll have hundreds or thousands of packets. Don’t panic. That’s what filters are for.
The three panes
- Packet list (top): one row per packet, with number, time, source, destination, protocol, length and info.
- Packet details (middle): click a packet to expand its layers.
- Packet bytes (bottom): the raw hex. You can mostly ignore this as a beginner.
Display filters you’ll use constantly
| Filter | Shows |
|---|---|
dns | Only DNS lookups and answers |
http | Unencrypted web requests |
tls.handshake.type == 1 | TLS “Client Hello” messages. Look for the server name inside |
ip.addr == 192.168.1.23 | Anything to or from that address |
tcp.port == 443 | Traffic on the HTTPS port |
dns && ip.src == 192.168.1.23 | Combine conditions with && (and) or || (or) |
Type a filter into the bar above the packet list and press Enter. The bar turns green when the filter is valid.
Follow the conversation
Filter for http, right-click the GET / request and choose Follow → HTTP Stream (or TCP Stream). You’ll see the request and the HTML response as one readable conversation. Try the same with an HTTPS site and you’ll see only encrypted gibberish. That’s TLS doing its job.
No network to capture? Use sample files
The Wireshark project hosts sample captures for almost every protocol. Open them with File → Open. They’re perfect for practice and contain no private data of yours.
🧪 Hands-on
Practice
Here’s a tiny simulated capture from a laptop visiting a website. Use the filter box and click packets to answer the questions.
🎬 Watch
Video: Wireshark Tutorial for Beginners
Video by Anson Alexander, hosted on YouTube. It loads only when you press play.
✅ Check yourself
Quick quiz
🔗 Go further
Trustworthy resources
- Wireshark User’s Guide Official documentation.
- Wireshark sample captures Safe practice files for every protocol.
- Wireshark source code Open source on GitLab.