Digital Forensic Tools
Home / Workflows / First look at a PCAP file
Case workflow

What happened in this network capture?

A packet capture (PCAP) file is a recording of network traffic. This workflow is a first pass over one: who talked to whom, which protocols were used, what can be read, and which files were sent. It uses Wireshark and its command-line twin tshark, then a second view with NetworkMiner and Zeek.

This workflow was written from the tools' documentation and published references. It has not yet been checked step by step on the practice data. If a step does not match what you see, please report it.

What you will be able to answer

  • When the capture started and ended, and how big it is
  • Which addresses talked to each other, and how much data they exchanged
  • Which protocols were used
  • What a plain-text conversation said
  • Which files were sent over HTTP and can be saved for study

What you need

  • A PCAP or PCAPNG file, or a practice capture (see the practice section on this page)
  • Wireshark installed. It includes tshark and capinfos. NetworkMiner and Zeek are optional
  • A virtual machine with no access to your own files, for opening anything exported from the capture

Steps

  1. 1

    Hash the file first

    Before you open the capture, calculate its hash value (a fixed-length fingerprint of the file) and write it down with the file name and where it came from. On Windows, Get-FileHash capture.pcap -Algorithm SHA256 in PowerShell does the same. Work on a copy and keep the original untouched. If the data source publishes a hash, compare it character by character.

    sha256sum capture.pcap
  2. 2

    Get the overview

    capinfos prints the file type, the link type (encapsulation), the number of packets, the first and last packet time and the capture duration. Wireshark shows the same under Statistics, Capture File Properties, and adds the file's hash values. The properties of a PCAPNG file can also hold capture details such as the interface and a comment. A plain PCAP file cannot. Note how long the recording is and how many packets you have to read.

    capinfos capture.pcap
  3. 3

    See which protocols are in the traffic

    Statistics, then Protocol Hierarchy, lists each protocol with its share of packets and bytes. The percentages do not add up to 100: every packet is counted once for each protocol layer it holds, so IP can show 100 percent while TCP shows less. Write down any protocol you did not expect. Wireshark often guesses a protocol from the port number, so check anything odd by looking at the packet itself.

    tshark -r capture.pcap -q -z io,phs
  4. 4

    See who talked to whom

    Statistics, then Conversations, has one row per pair of endpoints, with packets and bytes in each direction, start time and duration. Use the TCP and UDP tabs for ports. Sort by Bytes to find the busiest pairs. Tick Limit to display filter to see only what a filter shows, and Absolute start time to read clock times. Write down the top three pairs and the ports.

    tshark -r capture.pcap -q -z conv,tcp
  5. 5

    Narrow down with display filters

    A display filter hides all packets that do not match. Type it in the bar above the packet list. Useful starting points: ip.addr == 192.0.2.10 (one address, as source or destination), http.request (web requests), dns.qry.name contains "example" (name lookups) and tls.handshake.extensions_server_name (the site name a browser asked for in a TLS connection). Change the address and name to ones you found. The command below prints a table of web requests.

    tshark -r capture.pcap -Y http.request -T fields -e frame.number -e ip.src -e http.host -e http.request.uri
  6. 6

    Follow a stream

    Right-click a packet and choose Follow, then TCP Stream. Wireshark joins the packets of one conversation and shows the data in order. You can read it only if the protocol is plain text, such as HTTP. Stream numbers start at 0, and the filter tcp.stream eq 0 shows that stream's packets. Note the stream number and the packet numbers for your report. A capture that starts mid-conversation may lack the opening packets.

    tshark -r capture.pcap -q -z follow,tcp,ascii,0
  7. 7

    Export files sent over HTTP

    Go to File, then Export Objects. The menu offers DICOM, FTP-DATA, HTTP, IMF (e-mail), SMB and TFTP. For HTTP the list shows packet number, host name, content type, size and file name. Save the ones you need, hash them and record the hashes. In tshark, a name that is used twice gets a number added instead of being overwritten. HTTPS (TLS) traffic gives no files. Open exports only in a virtual machine.

    tshark -r capture.pcap --export-objects http,exported_files

    A file saved from a capture can be harmful. Handle it only inside an isolated virtual machine. Run tshark --export-objects help to see which protocols your version supports.

  8. 8

    Get a second view with NetworkMiner and Zeek

    The free NetworkMiner reads PCAP files, but not PCAPNG, so convert first, for example with editcap -F pcap in.pcapng out.pcap. It builds tabs such as Hosts, Files and DNS. Zeek writes its logs into the current folder, so run it in an empty one. conn.log has one line per connection: ts, uid, id.orig_h, id.resp_h, id.resp_p, proto, duration, orig_bytes, resp_bytes and conn_state. zeek-cut -d turns the time into a readable date.

    zeek -r capture.pcap
  9. 9

    Cross-check and write it down

    Confirm each important fact in two tools, for example a connection in Wireshark Conversations and the same one in Zeek conn.log. Byte counts differ on purpose: Wireshark counts whole packets, Zeek orig_bytes and resp_bytes count payload only. In conn_state, SF means a normal start and end, S0 means a connection attempt with no reply and REJ means it was rejected. Record tool versions, the capture hash, packet numbers and the time basis.

Where the evidence is stored

Capture File PropertiesWireshark, Statistics menu, or capinfos
Start and end time, packet count, file format, link type and file hashes
Protocol HierarchyWireshark, Statistics menu
Which protocols make up the traffic, by packets and bytes
ConversationsWireshark, Statistics menu
Pairs of endpoints with packet counts, byte counts, start time and duration
Followed streamWireshark, Analyze menu, Follow
The data of one conversation in order, readable if it is not encrypted
Exported objectsWireshark, File menu, Export Objects
Files sent over HTTP and some other protocols, with host name and size
Zeek conn.log, dns.log, http.logFolder where the zeek command ran
Connections, name lookups and web requests as text logs
NetworkMiner Hosts and Files tabsNetworkMiner window
Machines seen in the traffic and files rebuilt from it

Check your result

  • Run the same statistic in Wireshark and in tshark and compare the packet and byte counts.
  • Find the same connection in Wireshark Conversations and in Zeek conn.log: same addresses, ports and start time. Expect different byte counts, because Zeek counts payload only.
  • Hash a file exported by Wireshark and compare it with the same file shown in NetworkMiner's Files tab.
  • Check the capture's first and last time against the case notes, and note whether the times are UTC or local.

Common mistakes

  • Opening a file exported from the capture on a normal computer. It may be harmful. Use an isolated virtual machine.
  • Reading the Protocol Hierarchy percentages as shares that add up to 100.
  • Trusting the protocol name Wireshark shows. It is often a guess from the port number.
  • Giving a PCAPNG file to the free NetworkMiner and seeing nothing. Convert it to PCAP first.
  • Naming a person from an IP address, or ignoring that the capture may have started in the middle of a conversation.

Write it up

A short, careful way to state this kind of finding in a report. Change the details to match your own results.

The capture file [name] (SHA-256 [value]) holds [number] packets from [first time] to [last time], [time zone]. The largest conversation was between [address A] and [address B], [number] bytes over [protocol and port]. These facts come from [tool and version] and were confirmed with [second tool]. An address identifies a device on the network, not a person.

What this does not prove

  • Encrypted traffic, such as TLS (HTTPS), hides the content. You can see who talked, when and how much, and often the server name, but not what was said, unless you have the keys.
  • A capture may be incomplete. The recording may have started late, stopped early, missed packets, or been taken at a point that does not see all traffic.
  • An IP address is not a person. It can belong to a shared router, a VPN or an open Wi-Fi network, and many devices can sit behind one address (NAT).
  • Times come from the clock of the capturing device. If that clock was wrong, the times are wrong, so write down what you know about it.
  • An exported file shows that the data crossed the network. It does not show that anyone opened or ran it.
  • Tools can disagree on odd or damaged traffic. If two tools give different answers, say so in your notes and explain which one you trust and why.

Practise on public data

Nitroba University Harassment Scenario

by Digital Corpora

A teaching scenario set at a fictional university. A teacher receives harassing e-mails, and the address in the e-mail headers points to a dorm room that shares an unsecured Wi-Fi router. The page offers one capture, nitroba.pcap, about 60 MB, taken at a network tap. It lists the hashes: SHA256 2b77a9eaefc1d6af163d1ba793c96dbccacb04e6befdf1a0b01f8c67553ec2fb and MD5 9981827f11968773ff815e39f5458ec8. The solutions are password protected and given only to teachers at accredited schools, so there is no public answer key.

Your task. Download nitroba.pcap and compare its SHA256 hash with the value above. Then run steps 2 to 5: record the packet count, the file type and the protocol hierarchy, and list the three biggest conversations by bytes with their ports. Use the http.request filter and list the host names that were asked for. Say in one sentence why an address alone does not tell you who sent the e-mail.

The page says the timestamps are not relevant to solving its problem set, so do not build conclusions on them. It does not describe what traffic the capture holds, so treat any exported file as untrusted and open it only inside an isolated virtual machine. Read its Terms of Use first.

Where to go next

Sources and further reading

A study guide written in our own words. It is not a legal or laboratory procedure. Follow your own lab's approved method on real cases. Last reviewed 24 Nov 2026.