Tools and labs
Wireshark Basics for Beginners: Capture and Read Your Own Network Traffic
Wireshark lets you see what is actually travelling over a network, packet by packet. It is one of the best learning tools in cybersecurity, as long as you only capture traffic you are allowed to see.
First, the legal and ethical rule
Only test systems you own or have permission for. Capturing other people's network traffic, for example on a college or office network or a public WiFi, without authorisation can break the law and policies, and it invades privacy. Use Wireshark on your own laptop and home network, or inside your home lab between your own virtual machines. That is plenty to learn everything in this guide.
Install and first capture
- Download Wireshark from the official website, wireshark.org. Avoid third party download sites.
- On Windows, the installer offers Npcap, which is needed for capturing. On Linux, install from your distribution's package manager and follow the prompts about capture permissions.
- Open Wireshark. You will see a list of interfaces with small activity graphs. Pick the one with traffic, usually WiFi or Ethernet.
- Click the blue shark fin to start. Open a website in your browser. Wait five seconds. Click the red square to stop.
You will see hundreds of lines. Do not panic. Each line is one packet.
Understanding the three panes
- Packet list (top): one row per packet with time, source, destination, protocol and a short info column.
- Packet details (middle): the selected packet broken into layers: frame, Ethernet or WiFi, IP, TCP or UDP, then the application protocol. This is the OSI model from Part 6 of our Beginner Journey, live.
- Packet bytes (bottom): the raw bytes in hex and text.
Click a packet and expand each layer in the middle pane. Find the source and destination IP, the ports and the protocol.
Display filters: your superpower
Type filters in the bar at the top and press Enter:
dns # only DNS lookups
http # unencrypted web traffic
tls # encrypted web handshakes
tcp.port == 443 # traffic on port 443
ip.addr == 192.168.1.10 # traffic to or from one IP
tcp.flags.syn == 1 && tcp.flags.ack == 0 # new TCP connection attempts
dns.qry.name contains "example"
Note that display filters (which hide packets in the view) use a different syntax from capture filters (which decide what gets recorded). Start with display filters.
Five beginner exercises
- Watch DNS: filter
dns, visit a new website, and find the query and response with the IP address. - See the handshake: filter
tcp.port == 443, find the SYN, SYN-ACK and ACK packets at the start of a connection. - Find TLS server names: filter
tls.handshake.type == 1and look for the server name in the Client Hello. This shows which site was visited even though content is encrypted. - Follow a stream: in your lab, open an HTTP (not HTTPS) test page on your vulnerable VM, then right click a packet and choose Follow, TCP Stream to read the request and response.
- Lab scan from the defender side: run an nmap scan from one lab VM to another and watch the burst of SYN packets. See our nmap own lab guide.
What you can and cannot see with HTTPS
With HTTPS, the content of pages, passwords and cookies is encrypted, so Wireshark shows it as TLS application data. You can still see IP addresses, ports, DNS lookups (unless encrypted DNS is used), timing and often the server name. This is a good lesson in why encryption matters, and also why metadata can still reveal a lot.
On unencrypted HTTP in your lab, you will see everything in plain text, including any login form data. That is exactly why websites moved to HTTPS.
Tips and safety habits
- Save captures with File, Save As in pcapng format for later practice.
- Captures can contain private data. Do not upload them publicly. Use practice captures from trusted sources, like the sample captures linked in Wireshark's documentation, for sharing and writeups.
- Use Statistics, Conversations and Statistics, Protocol Hierarchy to get a summary of a big capture.
- Colour rules help: Wireshark highlights problems such as TCP retransmissions in different colours.
Wireshark skills are directly useful in SOC, network and incident response roles. Twenty minutes of practice a few times a week will make you comfortable within a month.
Educational content, not legal advice. Check official sources before you rely on it. If you have lost money, call 1930 now. Terms