Wireshark

Lessons on reading a packet capture: who talked, which protocol carried it, and whether the payload is still visible.

New here? Follow the first week, or pick a door on Start.

  • 30 lessons
  • 6 h of reading

Wireshark opens a capture from a file or a live interface. Each row is one frame: a time, a source, a destination, a protocol, and a short summary. The lessons linked below stay on that kind of reading.

Record traffic on a lab machine, or on a network you are authorized to monitor. A capture holds metadata, and it can hold secrets when a protocol is unencrypted. Keep the file with the engagement notes, and delete it when the agreement says to.

  1. 01The three panesThe list is a timeline, the details tree is the decode, and the bytes pane is what was on the wire.11 min
  2. 02What this capture can seeA capture is the view from one interface. The claims you can make stop at what that interface was handed.12 min
  3. 03Columns and profilesA profile is your lens: extra columns for the fields you keep reopening, stored beside the file rather than inside it.10 min
  4. 04Coloring rulesA color is a saved display filter with a paint pot. It can point at a row, and it is not a verdict.10 min
  5. 05Time display and deltasThe clock in the list is a view. Deltas measure the gap you asked for, which changes when a filter is on.12 min
  6. 06Saving, rings, and snap lengthA ring keeps a lab capture from filling the disk. A short snap length keeps the bytes you will wish you had.11 min
  7. 07Capture filtersA capture filter is a BPF expression. Frames that miss it are never written, so the syntax and the cost both matter.12 min
  8. 08Display filtersA display filter hides rows you already captured. The field name comes from the status bar, and the file stays whole.12 min
  9. 09The display filter languageComparison, logic, membership, and slices. The surprises are fields that occur twice, and fields that never share a frame.13 min
  10. 10Name resolution pitfallsA resolved name in the list is Wireshark’s addition. The address on the wire is the field, unless the packet itself carried a name.11 min
  11. 11The TCP handshakeThree frames open a connection: SYN, SYN-ACK, ACK. Relative sequence numbers make the first data byte look like 1.13 min
  12. 12Retransmissions and gapsA retransmission is a suspected repeat. A lost-segment note often means the capture never saw the original.13 min
  13. 13Zero windowsA zero window is the receiver telling the sender to stop. The stall is on the side that advertised zero.12 min
  14. 14Following a streamFollow reassembles one TCP conversation in order. Encrypted bytes stay encrypted unless you were given the keys.12 min
  15. 15Conversations and endpointsConversations are pairs. Endpoints are hosts. The checkbox for the display filter decides which file you just counted.12 min
  16. 16Reading DNSA query and its response share an id. The name, the type, and the response code are the fields worth quoting.13 min
  17. 17Reading DHCPDiscover, offer, request, ack. The message type is option 53, and the router and DNS options are the host’s new map.12 min
  18. 18Reading ARPA request asks who has an address. A reply binds that address to a hardware address. Two bindings are a conflict to report.11 min
  19. 19Reading cleartext HTTPCleartext HTTP is readable in the follow. Host, method, URI, status, and the body are fields, and TLS will hide them later.13 min
  20. 20A TLS handshake, and what stays hiddenThe handshake shows who tried to talk and which parameters they chose. Application data stays unreadable without the client’s secrets.14 min
  21. 21Exporting objectsExport Objects carves files the dissector already reassembled. Cleartext HTTP works. Unopened TLS does not.11 min
  22. 22Expert InformationThe expert window collects notes the dissectors already made. Severity is how loud the note is, not how serious the incident is.11 min
  23. 23Checksum offloadA bad checksum on packets the capturing host sent is usually the NIC filling in the checksum later. Confirm the direction before you report corruption.10 min
  24. 24Protocol hierarchy and the I/O graphHierarchy says what the file is made of. The I/O graph says when a filtered slice of it happened.11 min
  25. 25The same questions in tsharktshark reads a file you already have and prints fields or a statistic. -r is the mode this lesson uses.12 min
  26. 26Indicators from a capturePull addresses, names, and fingerprints you can defend. Leave out the resolver, the broadcast, and anything you cannot tie to a frame.13 min
  27. 27Case: a password left in the lab fileA cleartext login is readable because the service sent it that way. The finding is the listener. The file is now a secret.13 min
  28. 28Case: a regular connection, judged from timingA destination that wakes on a steady interval is a lead. Timing alone does not name the program, and several ordinary agents look the same.13 min
  29. 29Case: a DNS lookup patternA host that suddenly asks for many unique names, most of them missing, is a pattern you can count. You do not need to decode the labels to report it.13 min
  30. 30Case: a scan, seen from the side that was scannedMany SYNs, many ports, almost no payload. That shape is a scan when you are the one who recorded the target.13 min

Overview lesson · Course · 13 min

Wireshark: reading a capture

A packet capture is a recording of conversations. Wireshark is how you slow that recording down and ask a specific question.

Diagram

From one question to five frames you can explain

Follow the path. One example at a time.

Step 1 of 4

Question

Did this lab conversation start TLS? Write that before you scroll.

Illustration: Question
# Question
# Did this lab conversation start TLS? Write that before
# you scroll.

The example on the open step is one illustration, or the fix you can paste into an application you own.

What you are looking at

Wireshark opens a capture: a file or a live interface full of frames. Each row is one frame, with a time, source, destination, protocol, and a short summary. The panes below decode that frame into layers, from the link up through the application. You are not “watching the internet.” You are looking at what this interface was allowed to see.

Captures contain other people’s secrets the moment a protocol is unencrypted, and they contain metadata even when the payload is encrypted. A capture from a production network is sensitive. Take it under the same authorization as any other access to that network, keep it with the engagement notes, and delete it when the agreement says to.

Ask one question at a time

A useful capture session starts with a question. Which host did this laptop talk to when the login failed? Did the DNS name resolve to the address we expect? Is the session actually using TLS, or did it fall back? Display filters exist so the screen shows only the frames that can answer that question. A filter is a sentence about fields: this address, this port, this handshake type.

Follow a single conversation when the question is about one exchange. The handshake, the request, the response, and the teardown tell you whether the application did what the designer claimed. Encrypted payloads stay opaque. You can still see who talked, when, and how much. You cannot read the password inside TLS, and a lesson that pretends otherwise is wrong.

Snippet
Time        Source        Destination   Info
0.000       10.10.10.10   10.10.10.20   SYN
0.001       10.10.10.20   10.10.10.10   SYN, ACK
0.002       10.10.10.10   10.10.10.20   ACK
0.004       10.10.10.10   10.10.10.20   Client Hello
0.012       10.10.10.20   10.10.10.10   Server Hello, Certificate

Reading the sample

The sample is five frames, not four. The first three are the TCP handshake: SYN, SYN/ACK, then ACK. The last two are the start of TLS, a Client Hello and a Server Hello that carries a certificate. The client reached the server, both sides agreed to talk, and the following bytes are a TLS negotiation, not a cleartext login. That is good news if the application promised encryption, and it is the whole story this capture can tell you about the secret itself.

If the same capture instead showed an application protocol you can read in the info column, carrying a session token or a password, the finding is the missing encryption, or the protocol that should not still be in use. The control is TLS in front of that conversation, and a retirement date for the cleartext protocol.

This page is the overview

This is the hub for packet capture, not the whole subject. A later page can take one question on its own: which name was resolved, whether a protocol was still cleartext, who was supposed to be on the segment, or when the file has to be deleted. Those pages assume this one. If one of them disagrees with this page about permission, or about reading a secret out of TLS, this page wins.

Bring a capture from a lab interface back to the same test. One question. A handshake you can name. A payload you do not pretend to read when it is encrypted. A file you can delete on the date you wrote down.

How to practice

Capture on an interface that only sees your lab. Generate a connection you understand, such as a browser request to a site you run, and find that conversation. Name the handshake, the name resolution if it is in the file, and whether the application data is opaque.

Wireshark is also a defender’s tool. The same file, given to someone who was not in the room, should be explainable. If you cannot say which question the capture answers, it is a pile of frames, not an analysis.

Check yourself

Recognition and the fix. Nothing here is a procedure.

1 / 3

How many frames are in the sample handshake-and-hello?