Skip to content

NetworkMiner PCAP Lab: How to Verify a File Transfer

Use NetworkMiner and Wireshark to trace a file to its HTTP response in a practice PCAP, then compare the recovered file’s hash.

By Sourabh7 min read

Open the practice capture in NetworkMiner and you’ll see a 38-byte file called lab-note.txt. The Files tab points you to frame 4. When you open that frame in Wireshark, all you find is a request. Where are the file bytes?

They’re in the server’s response in frame 6. Let’s follow that exchange and compare the recovered file with what the server actually sent. The walkthrough uses a ten-packet capture, so you can check the entire result yourself.

What would count as evidence of a transfer?

Put yourself on the client side for a moment. Your browser asks the server for lab-note.txt. The server might send it, reject the request, or return an error page. In the capture, the request gives you the name to look for. The response tells you what happened next.

A packet capture, or PCAP, records the traffic seen at the point where you collected it. NetworkMiner looks through those recorded packets and reassembles data it recognizes. Use its Files tab to find a candidate, then go back to the packets when you need to show where the bytes came from.

Download the practice PCAP. You’ll need Netresec’s NetworkMiner Free Edition and Wireshark. The capture is a synthetic lab with reserved IP addresses and a harmless text file. The Wireshark walkthrough covers opening a capture and entering a display filter if this is your first time.

Find the recovered object in NetworkMiner

  1. On Windows, extract the NetworkMiner ZIP to a folder you can write to. Start the application, choose File → Open, and select networkminer-http-practice.pcap.
  2. In Hosts, look for 192.0.2.10 and 198.51.100.20. In Sessions, look for the TCP conversation from client port 50812 to server port 80.
  3. In Files, look for the HTTP object associated with /lab-note.txt. Use the endpoints and the expected 38-byte body to identify it if the displayed name differs.

Here’s what the test run returned. NetworkMiner 3.2 Free Edition on Debian with Mono showed one file, lab-note.txt, at 38 bytes. The source was 198.51.100.20, and the destination was 192.0.2.10. The row points to frame 4 because it’s associated with the request. Keep that reference handy when you look for the response in Wireshark.

NetworkMiner 3.2 Free Edition, captured on Debian with Mono.

Record the name, size, and endpoints. Right-click the file row and choose Open folder to find the bytes NetworkMiner wrote to disk. The files are generally stored under AssembledFiles, so the recovered file may be in a subdirectory. Use Open folder to locate the exact file for hashing. In an unfamiliar capture, opening the file itself can execute untrusted content.

The test run saved the file under AssembledFiles/198.51.100.20/TCP-80/lab-note.txt. The base directory can differ on Windows, so use the folder opened by your own run.

The two IP addresses tell you which network endpoints the capture observed. They give you a starting point for investigating a device or session. Identifying a person would take additional evidence, such as a login record tied to a known device.

Trace the object to its HTTP response in Wireshark

Open the same capture in Wireshark and apply this display filter. This check uses the original packets, so you can do it even if NetworkMiner did not extract a file.

text
http.request or http.response

Frame 4 contains the request for /lab-note.txt. The client sends it from 192.0.2.10:50812 to 198.51.100.20:80. Frame 6 travels the other way. It contains the HTTP response and the file body. The object you recover came from the response, which is why its direction is the opposite of the request.

Selected frames from the synthetic practice capture. The request goes to the server. The file bytes travel back to the client.

In the decoded exchange below, the client requests the file from training.example. The server identifies the response body as text/plain. The illustration omits the connection setup and acknowledgments.

Selected lines decoded from the practice PCAP.

Look below the response headers for the body. The 200 OK status says the server handled the request successfully. The actual bytes in the capture are what let you verify what it sent. In this lab, the final newline is part of those 38 bytes. If you copy the visible sentence into a fresh text file, your editor can change the line ending and produce a different hash.

The header’s Content-Length: 38 is the stated body length. Here, the 38 bytes are also present in the capture. You need both checks if a capture is cut short. A header that says 38 bytes describes what the sender intended to provide, even if the capture contains fewer bytes.

If there are several conversations in your own capture, start from the request and use Follow → TCP Stream in Wireshark to isolate its stream. Record the frame numbers from the unfiltered capture so someone else can find the same evidence. A large transfer can span many TCP segments. Expect the response body to take more work to verify than it does in this deliberately small sample.

Verify the recovered file against the response body

In PowerShell, run this on the file recovered by NetworkMiner. Substitute the path to the actual extracted file.

powershell
Get-FileHash -Algorithm SHA256 -LiteralPath .\lab-note.txt

The expected SHA-256 below was calculated from the 38-byte body in frame 6. You can compare it directly with the hash of your extracted file.

text
c252c0dcee1f2d7b70262dff2e6c1adbc7ba4acce0c32537ccf0bf8133cccc17

Compare your digest with the one above. The NetworkMiner export in the test run matched the SHA-256 of the captured response body. If yours differs, check the size and the row you selected before running the extraction again. You may have picked a different transfer with the same filename or worked from a capture with a partial response.

For a second export, choose File → Export Objects → HTTP in Wireshark, select the object for lab-note.txt, and save it to a different folder. Hash that file as well if you need to compare two exports. Keep the packet references with the hashes, since those references establish where the bytes came from.

Try the same reasoning with a missing response

To repeat the exercise with only the request, apply frame.number <= 4 in Wireshark. Choose File → Export Specified Packets, select Displayed and All packets, then save to a separate classic .pcap file. Open that copy in a fresh NetworkMiner session. Frame 4 is still available, but the response was in frame 6. Record the request and leave the file transfer unconfirmed from that copy.

A separate NetworkMiner 3.2 run used a copy containing only frames 1–4. It produced no lab-note.txt file. The full capture produced one file and its hash matched the response body.

Comparison of the two practice captures.

If the Files tab is empty on a different capture, check the response before reinstalling the tool. The payload may be absent, truncated, or encrypted. If you can see a complete, supported plaintext transfer in the packets, check whether NetworkMiner can write to its output location. For an ordinary HTTPS capture, expect to see encrypted traffic and some connection details. In the absence of accessible plaintext, the file body may stay unavailable.

Write the finding from the packets outward

A finding for the verified sample can be brief: “The client requested /lab-note.txt in frame 4. Frame 6 contains the server’s 38-byte response body. The SHA-256 of the recovered file matched the SHA-256 of that body.” Keep the PCAP name, frame numbers, tool versions, and digest with that note.

The capture supports a finding about data sent by the server at the point observed. Whether an application saved the file or a person opened it is a separate question. That question points you toward endpoint records rather than another pass through the same packets. The Wireshark and NetworkMiner comparison explains how to move between the packet and artifact views in a longer investigation.