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
- Open your web browser and clear cache memory
- Launch Wireshark
- Select active network interface
- Click Start Capturing
- Open any website (preferably HTTP, not HTTPS)
-
In Wireshark filter bar, type:
- Click Apply
- Capture sufficient packets
- Click Capture → Stop
- 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
Post a Comment