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.

Capture only what you’re allowed to

Capture on your own devices and networks, or with clear permission. Captures can contain private information like visited sites and cookies, so don’t post your pcap files publicly.

Your first capture

  1. Install Wireshark from the official download page. On Windows it will offer to install Npcap, which it needs to capture.
  2. 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.
  3. Open a browser and visit http://example.com (plain HTTP, on purpose, so you can read it).
  4. 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

FilterShows
dnsOnly DNS lookups and answers
httpUnencrypted web requests
tls.handshake.type == 1TLS “Client Hello” messages. Look for the server name inside
ip.addr == 192.168.1.23Anything to or from that address
tcp.port == 443Traffic on the HTTPS port
dns && ip.src == 192.168.1.23Combine 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

ToolsWireshark Tutorial for BeginnersAnson Alexander · Watch on YouTube

Video by Anson Alexander, hosted on YouTube. It loads only when you press play.

✅ Check yourself

Quick quiz

Q1. Which display filter shows only DNS traffic?
Q2. You follow the stream of an HTTPS connection. Why can’t you read the page?
Q3. Is it OK to capture traffic on your school’s network to learn?