Analysis of HTTP Protocol using Wireshark



Experiment Title

Analysis of HTTP Protocol using Wireshark


Aim

To capture and analyze HTTP packets using Wireshark and study the structure of HTTP request and response messages.


Objective

  • To understand HTTP request and response formats
  • To analyze packet-level communication using Wireshark
  • To extract protocol-specific information from captured traffic

Software Required

  • Wireshark
  • Web Browser (Chrome / Firefox / Edge)
  • Internet Connection

Theory

🌐 What is HTTP?

HTTP (HyperText Transfer Protocol) is an application-layer protocol used for communication between web clients (browsers) and web servers.


🔁 HTTP Communication

  • Client sends a GET request
  • Server responds with:
    • Status code
    • Requested resource
    • Metadata

📦 HTTP Message Types

Request Message

Contains:

  • Method (GET, POST)
  • URL
  • Headers (Accept, User-Agent, etc.)

Response Message

Contains:

  • Status code (200, 404, etc.)
  • Headers (Content-Type, Content-Length, etc.)
  • Body (HTML content)

Procedure

  1. Open your web browser and clear cache memory
  2. Launch Wireshark
  3. Select active network interface
  4. Click Start Capturing
  5. Open any website (preferably HTTP, not HTTPS)
  6. In Wireshark filter bar, type:

    http
  7. Click Apply
  8. Capture sufficient packets
  9. Click Capture → Stop
  10. Locate the first HTTP GET request and corresponding response

Observations

🔹 (a) Source and Destination IP (First GET Request)

  • Source IP Address: __________
  • Destination IP Address: __________

🔹 (b) Accepted Formats (From GET Request Headers)

  • Medium Format (Accept): __________
  • Language (Accept-Language): __________
  • Encoding (Accept-Encoding): __________
  • Character Set (Accept-Charset): __________ (if present)

🔹 (c) URL and User-Agent

  • Requested URL: __________
  • User-Agent: __________

🔹 (d) Source and Destination IP (First Response)

  • Source IP Address: __________
  • Destination IP Address: __________

🔹 (e) Status Code (Response Message)

  • Status Code: __________
    (Example: 200 OK, 404 Not Found)

🔹 (f) Last Modified Date

  • Last-Modified Field: __________

🔹 (g) Content-Length

  • Content-Length: __________ bytes

🔹 (h) Time Taken for Response

  • GET Request Time: __________
  • Response Time: __________
  • Time Difference: __________ seconds

🔹 (i) HTTP Version

  • HTTP Version Used: __________
    (Example: HTTP/1.1 or HTTP/2)

Sample Interpretation (for understanding)

  • GET request shows what the client wants and accepts
  • Response shows what the server provides
  • Time difference indicates network latency

Result

HTTP packets were successfully captured and analyzed using Wireshark. The structure of request and response messages was studied and key parameters were identified.

Comments