Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Week-12 - Network Forensics Lab 3: HTTP Traffic Analysis & Image Extraction


Aim

Extract images transmitted over HTTP from network traffic captures. You will identify image downloads, extract the raw image data using magic numbers and trailers, and verify file integrity using hash values.


Learning Objectives

  • Understand HTTP request/response structure
  • Identify image transfers in HTTP traffic
  • Extract files using Wireshark's Export Objects feature
  • Manually extract files using magic numbers and hex editors
  • Verify extracted files using MD5 hash values

Resources Needed


Background

Scenario: Illegal Possession Investigation

A suspect is under investigation for possession of illegal images of endangered species (rhinos). Network traffic has been captured from their computer. Your task is to:

  1. Identify any image downloads via HTTP
  2. Extract the images from the network traffic
  3. Document evidence with hash values

HTTP Protocol

HTTP (Hypertext Transfer Protocol) transfers data across the web using request/response pairs:

MethodPurpose
GETRequest/download data from server
POSTSend data to server

File Magic Numbers

Every file type has a signature (magic number) at the start and often a trailer at the end:

File TypeMagic Number (Hex)Trailer (Hex)
JPEGFF D8 FFFF D9
GIF47 49 46 38 (GIF8)00 3B
PNG89 50 4E 47AE 42 60 82

Part A: Initial Traffic Analysis

Task 1: Open and Explore the Capture

  1. Open rhino2.log in Wireshark
  2. Examine the packet list

Q1.1: How many packets are in this capture?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 370 packets


Q1.2: What IP addresses are involved in this capture? List them:

Your Answer: _______________________________________________

Click to reveal answer

Answer:

  • 137.30.123.234 (suspect's machine)
  • 137.30.120.37 (web server - cs.uno.edu)
  • 64.233.167.104 (Google)
  • 137.30.120.39

Q1.3: What protocols are present? (Check Statistics → Protocol Hierarchy)

Your Answer: _______________________________________________

Click to reveal answer

Answer: HTTP, TCP, IMAP (email), and others


Task 2: Filter HTTP Traffic

  1. Apply the display filter: http

Q2.1: How many HTTP packets are displayed?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Approximately 20-30 HTTP packets (23 ideally)


Q2.2: What is the suspect's IP address (the one making GET requests)?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 137.30.123.234


Part B: Finding Image Downloads

Task 3: Search for JPEG Downloads

  1. Apply the filter to find HTTP requests for .jpg files:
    http.request.uri contains ".jpg"
    

Q3.1: How many HTTP requests for .jpg files are there?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 1 (rhino4.jpg)


Q3.2: What is the filename of the JPEG being requested?

Your Answer: _______________________________________________

Click to reveal answer

Answer: rhino4.jpg


Q3.3: What is the full URL path of this request?

Your Answer: _______________________________________________

Click to reveal answer

Answer: /~gnome/rhino4.jpg


Q3.4: What packet number contains the GET request for this image?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Packet 49


Task 4: Examine the Server Response

  1. Find the server's response to the rhino4.jpg request (packet 50)
  2. Examine the HTTP headers

Q4.1: What HTTP response code was returned?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 200 OK


Q4.2: What is the Content-Type header value?

Your Answer: _______________________________________________

Click to reveal answer

Answer: image/jpeg


Q4.3: What is the Content-Length (file size in bytes)?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 153191 bytes (approximately 150 KB)


Q4.4: What web server software is hosting this file?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Apache/1.3.29 (Unix)


Task 5: Search for GIF Downloads

  1. Apply the filter to find HTTP requests for .gif files:
    http.request.uri contains ".gif"
    

Q5.1: How many HTTP requests for .gif files are there?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 5 GIF requests


Q5.2: List the GIF filenames requested:

Your Answer:






Click to reveal answer

Answer:

  1. logo.gif (Google logo)
  2. blank.gif
  3. image2.gif
  4. back.gif
  5. rhino5.gif

Q5.3: Which of these GIFs is related to the investigation?

Your Answer: _______________________________________________

Click to reveal answer

Answer: rhino5.gif


Q5.4: What packet number contains the GET request for rhino5.gif?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Packet 217


Part C: Extracting Images - Method 1 (Export Objects)

Task 6: Use Wireshark's Export Objects Feature

  1. Go to File → Export Objects → HTTP
  2. A window will display all HTTP objects that can be exported

Q6.1: How many objects are listed in the Export HTTP Objects window?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Multiple objects including HTML pages, GIFs, and JPEGs


Q6.2: Can you see rhino4.jpg in the list?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Yes


  1. Select rhino4.jpg and click Save
  2. Save the file to your working directory

Q6.3: Were you able to successfully export and open rhino4.jpg?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Yes - Export Objects is the easiest method for extracting HTTP-transferred files


  1. Repeat for rhino5.gif

Part D: Extracting Images - Method 2 (Manual Hex Extraction)

Sometimes Export Objects doesn't work (corrupted streams, partial captures). Learn the manual method:

Task 7: Follow the HTTP Stream

  1. Find packet 49 (GET request for rhino4.jpg)
  2. Right-click → Follow → HTTP Stream
  3. Change "Show data as" to Raw

Q7.1: Can you identify the HTTP headers at the start of the response?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Yes - you can see HTTP/1.1 200 OK followed by headers like Content-Type, Content-Length, etc.


Task 8: Find the JPEG Magic Number

  1. In the raw data, look for the JPEG magic number: FF D8 FF
  2. This marks the start of the actual image data (after the HTTP headers)

Q8.1: Can you locate the JPEG magic number (FF D8 FF) in the stream?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Yes - it appears after the HTTP headers (after the blank line following headers)


Task 9: Find the JPEG Trailer

  1. Scroll to the end of the data
  2. Look for the JPEG trailer: FF D9

Q9.1: Can you locate the JPEG trailer (FF D9) at the end?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Yes - FF D9 marks the end of the JPEG file


Task 10: Manual Extraction with Hex Editor

  1. In Wireshark's hex pane, select from FF D8 FF to FF D9 (inclusive)
  2. Copy the raw bytes
  3. Open a hex editor (HxD, Bless, etc.)
  4. Paste the bytes
  5. Save as rhino4_manual.jpg

Q10.1: Does the manually extracted file open correctly as an image?

Your Answer: _______________________________________________

Click to reveal answer

Answer: Yes - if you correctly selected from the magic number to the trailer, the image should display correctly


Task 11: Extract rhino5.gif Manually

  1. Find packet 217 (GET request for rhino5.gif)
  2. Follow HTTP Stream → Raw
  3. Find GIF magic number: 47 49 46 38 (or "GIF8" in ASCII)
  4. Find GIF trailer: 00 3B
  5. Extract and save as rhino5_manual.gif

Q11.1: What text can you see at the start of the GIF data (the magic number in ASCII)?

Your Answer: _______________________________________________

Click to reveal answer

Answer: GIF89a or GIF87a (the "GIF8" followed by version)


Part E: Verification with Hash Values

Task 12: Calculate MD5 Hashes

  1. Calculate MD5 hash of your extracted rhino4.jpg:
    md5sum rhino4.jpg
    
    Or on Windows:
    certutil -hashfile rhino4.jpg MD5
    

Q12.1: What is the MD5 hash of rhino4.jpg?

Your Answer: _______________________________________________

Click to reveal answer

Answer: a64102afff71b93ed61fb100af8d52a (or similar - verify with your extraction)


  1. Calculate MD5 hash of rhino5.gif:

Q12.2: What is the MD5 hash of rhino5.gif?

Your Answer: _______________________________________________

Click to reveal answer

Answer: 1e90b7f70b2ecb605898524a88269029


Q12.3: Why are MD5 hashes important in forensic investigations?

Your Answer: _______________________________________________


Click to reveal answer

Answer:

  • Prove file integrity (file hasn't been modified)
  • Create unique identifier for evidence
  • Enable searching hash databases for known illegal content
  • Chain of custody verification

Part F: Evidence Documentation

Task 13: Complete the Evidence Table

Fill in this evidence summary:

Evidence #FilenameTypeSource IPServer IPFile SizeMD5 Hash
1JPEG
2GIF
Click to reveal answer
Evidence #FilenameTypeSource IPServer IPFile SizeMD5 Hash
1rhino4.jpgJPEG137.30.123.234137.30.120.37153,191 bytesa64102afff71b93ed61fb100af8d52a
2rhino5.gifGIF137.30.123.234137.30.120.3785,137 bytes1e90b7f70b2ecb605898524a88269029

Task 14: Determine the Server

  1. Use the filter ip.addr == 137.30.120.37 to see traffic to/from the server

Q14.1: What organisation owns the server hosting the rhino images? (Hint: look at the URL path /~gnome/)

Your Answer: _______________________________________________

Click to reveal answer

Answer: cs.uno.edu (University of New Orleans Computer Science department) - the ~gnome suggests a user directory


Key Findings

In this lab, you extracted images from HTTP traffic:

ItemDetails
Suspect IP137.30.123.234
Server IP137.30.120.37 (cs.uno.edu)
Image 1rhino4.jpg (JPEG, 153KB)
Image 2rhino5.gif (GIF, 85KB)
DateWed, 28 Apr 2004

Useful Wireshark Filters

FilterPurpose
httpAll HTTP traffic
http.request.method == "GET"HTTP GET requests only
http.request.uri contains ".jpg"Requests for JPEG files
http.request.uri contains ".gif"Requests for GIF files
http.content_type contains "image"Responses containing images
http.response.code == 200Successful HTTP responses

Magic Numbers Reference

TypeStart (Hex)End (Hex)
JPEGFF D8 FFFF D9
GIF47 49 46 3800 3B
PNG89 50 4E 47AE 42 60 82

Best,

Ali.

Copyright © 2026 • Created by Ali Jaddoa

Page last updated: Tuesday 21 April 2026 @ 07:28:28 | Commit: e7be396