Lab 1.2: Observing Network Traffic with Wireshark
Learning Objectives
By the end of this lab, you will be able to:
- Install and configure Wireshark
- Capture network traffic in real-time
- Filter packets to isolate what interests you
- Understand basic network protocols (TCP, UDP, DNS, HTTP)
- Analyze a simple network communication
Estimated Duration
45 minutes
Prerequisites
- Lab 1.1 completed
- Administrator rights on your computer
- Active Internet connection
Professional Context
Wireshark is the world's most widely used network traffic analysis tool by IT professionals. It allows you to:
- Diagnose complex network issues
- Analyze network performance
- Understand application behavior
- Detect security anomalies
- Validate network configuration
Part 1: Installing Wireshark
Step 1.1: Download
- Visit: https://www.wireshark.org/download.html
- Download the Windows Installer version (64-bit)
- Run the installation file
Step 1.2: Installation
Recommended installation settings:
- Accept all default options
- IMPORTANT: Install Npcap when prompted (necessary for packet capture)
- Check the option "Install Npcap in WinPcap API-compatible mode" if prompted
Step 1.3: First Launch
- Launch Wireshark (as administrator if prompted)
- You should see the list of your network interfaces
- Identify the interface with traffic (graph with spikes)
Questions:
- How many network interfaces are listed?
- Which one shows activity?
Part 2: First Capture
Step 2.1: Start a Capture
- Double-click on your active network interface (usually Ethernet or Wi-Fi)
- Wireshark immediately starts capturing packets
- You will see lines scrolling quickly
Observe:
- Each line = a network packet
- Different colors = different types of protocols
- The columns show: Time, Source, Destination, Protocol, Info
Step 2.2: Generate Simple Traffic
Keep Wireshark open and in the command prompt:
Execute:
ping google.com -n 4
In Wireshark:
- You should see ICMP packets appear
- Look for lines with "Echo (ping) request" and "Echo (ping) reply"
Step 2.3: Stop the Capture
Click the red square (Stop) button in the toolbar.
Questions: 3. How many packets did you capture in total? 4. Can you identify the 4 pings you sent?
Part 3: Packet Filtering
You probably captured hundreds or thousands of packets. Filters allow you to see only what interests you.
Step 3.1: ICMP (Ping) Filter
In the filter bar (at the top), type:
icmp
Press Enter. Now you only see the ping packets!
Observe:
- The requests (request) from your computer to google.com
- The replies (reply) from google.com to you
Step 3.2: Filter by IP Address
To see all traffic to/from a specific IP address:
ip.addr == 8.8.8.8
(Replace with the IP of google.com found in your capture)
Step 3.3: Clear a Filter
Click the X to the right of the filter bar to see all packets again.
Part 4: DNS Capture and Analysis
DNS translates domain names (google.com) into IP addresses.
Step 4.1: New DNS Capture
- Clear the current capture: File → Close
- Start a new capture
- Immediately apply the filter:
dns
Step 4.2: Generate DNS Traffic
In the command prompt:
Execute:
nslookup facebook.com
nslookup youtube.com
nslookup wikipedia.org
Step 4.3: Analyze DNS Requests
In Wireshark, select a "Standard query" DNS packet
In the bottom panel, expand:
- Domain Name System (query)
- Queries
- Look at the "Name" requested
- Queries
Select now a "Standard query response" packet
Expand:
- Domain Name System (response)
- Answers
- You will see the returned IP address!
- Answers
Questions: 5. What is the IP address of facebook.com? 6. What DNS server is your computer querying? (look at the Destination column) 7. How long did the DNS request take? (look at the Time column)
Part 5: HTTP Capture (Web Traffic)
Step 5.1: Setup
- New capture
- Filter:
http
Step 5.2: Generate HTTP Traffic
IMPORTANT: You must visit a site in HTTP (non-secure) to see the content.
Visit in your browser:
Step 5.3: Analyze an HTTP Request
Select a "GET" line (HTTP request)
In the detailed panel, expand:
- Hypertext Transfer Protocol
- You will see the complete request
- The headers (User-Agent, Host, etc.)
Questions: 8. What is your browser's User-Agent? 9. What information is visible in clear text in the HTTP request? 10. Why is HTTPS more secure? (hint: repeat with https://google.com and see the difference)
Part 6: Analyzing a Complete Communication
Step 6.1: TCP Three-Way Handshake
The TCP protocol establishes a connection before transmitting data.
- New capture with filter:
tcp - Visit: http://example.com
- Stop the capture
Look for the first 3 packets to the server (port 80):
- Packet 1: [SYN] - Your computer requests a connection
- Packet 2: [SYN, ACK] - The server accepts
- Packet 3: [ACK] - Your computer confirms
Questions: 11. Can you find the three-way handshake in your capture? 12. What are the sequence (Seq) and acknowledgment (Ack) numbers?
Step 6.2: Follow TCP Stream
To see the entire conversation:
- Right-click on an HTTP packet
- Follow → TCP Stream
- A new window opens with the entire conversation in clear text!
Observe:
- In red: What you sent
- In blue: What the server replied
- All the HTML content is visible!
Part 7: Practical Exercises
Exercise 7.1: HTTP vs HTTPS Comparison
Task:
- Capture traffic to http://neverssl.com
- Capture traffic to https://google.com
- Try to "Follow TCP Stream" on both
Question: 13. What can you see in HTTP that you cannot see in HTTPS?
Exercise 7.2: Protocol Identification
Visit different sites and identify the protocols used:
Sites to test:
- https://youtube.com (look for QUIC or HTTP/2 protocols)
- Launch a Windows update (Microsoft protocols)
- Open Discord or Teams (WebRTC)
Questions: 14. What new protocols did you discover? 15. How many TCP connections are established when you visit youtube.com?
Exercise 7.3: Problem Diagnosis
Simulate a network problem:
- Start a capture
- Ping an address that does not exist:
ping 1.2.3.4 -n 2 - Analyze the capture
Questions: 16. Do you see any ICMP "Destination unreachable" packets? 17. Who sends these messages? (look at the Source column)
Part 8: Network Statistics
Wireshark offers powerful analysis tools.
Step 8.1: Protocol Hierarchy
Menu: Statistics → Protocol Hierarchy
This shows the breakdown of all captured protocols.
Questions: 18. Which protocol represents the largest percentage of your traffic? 19. What percentage is encrypted traffic (TLS)?
Step 8.2: Conversations
Menu: Statistics → Conversations
IPv4 tab: Shows all conversations between IP addresses.
Questions: 20. With which IP address did you exchange the most data? 21. How many different conversations did you establish?
Step 8.3: Endpoints
Menu: Statistics → Endpoints
Lists all IP addresses that communicated.
Deliverables
To submit:
-
Wireshark capture file (.pcapng) containing:
- ICMP (ping) packets
- DNS requests
- HTTP traffic
-
Answer document (Word/PDF) with:
- Answers to the 21 questions
- 3 screenshots:
- Capture with ICMP filter
- DNS request capture with details
- "Follow TCP Stream" of an HTTP request
-
Comparative analysis HTTP vs HTTPS (1 page):
- What you can see in HTTP
- What is hidden in HTTPS
- Why it is important for security
Evaluation Criteria
| Criterion | Points |
|---|---|
| Capture file containing all requested traffic types | 25% |
| Answers to questions (understanding of protocols) | 35% |
| Relevant and annotated screenshots | 20% |
| HTTP/HTTPS comparative analysis | 15% |
| Quality of documentation | 5% |
Reference Wireshark Filters
| Filter | Description | Example |
|---|---|---|
icmp | All ping packets | icmp |
dns | All DNS requests | dns |
http | Unencrypted web traffic | http |
tcp | All TCP packets | tcp |
udp | All UDP packets | udp |
ip.addr == X | Traffic to/from an IP | ip.addr == 8.8.8.8 |
tcp.port == X | Traffic on a TCP port | tcp.port == 80 |
ip.src == X | Packets from an IP | ip.src == 192.168.1.1 |
ip.dst == X | Packets to an IP | ip.dst == 8.8.8.8 |
http.request.method == "GET" | HTTP GET requests | http.request.method == "GET" |
dns.qry.name contains "google" | DNS requests containing "google" | dns.qry.name contains "google" |
Useful Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl + E | Start/Stop capture |
Ctrl + K | Capture options |
Ctrl + W | Close capture |
Ctrl + F | Find a packet |
Ctrl + G | Go to packet N |
Ctrl + R | Reload file |
Troubleshooting
Problem: "Couldn't run /usr/bin/dumpcap"
Solution: Wireshark does not have the necessary permissions.
- Relaunch Wireshark as administrator (right-click → Run as administrator)
Problem: No interface appears
Solution: Npcap is not installed correctly.
- Reinstall Wireshark and ensure Npcap is installed
Problem: "The capture session could not be initiated"
Solution:
- Another application might be using the network interface
- Close VPNs and other network tools
- Restart your computer
Problem: Too many packets, hard to see what interests me
Solution:
- Use filters!
- Stop applications generating traffic (updates, cloud sync, etc.)
- Capture only while generating the desired traffic
Going Further (Optional)
Challenge 1: Identify an Application
Open an application (Discord, Spotify, Steam) and identify:
- The servers it communicates with
- The protocols used
- The amount of data exchanged
Challenge 2: Performance Analysis
Measure the time required for:
- DNS resolution
- TCP connection establishment
- Full web page loading
Challenge 3: Exotic Protocols
Find and document 3 protocols you did not know before this lab.
Additional Resources
- Wireshark User Guide (Official)
- Wireshark Display Filters
- Wireshark Sample Captures
- Introduction to Network Protocols
Next Steps
In the next lab, you will learn to:
- Inventory your Windows system in depth
- Identify running processes and services
- Document your system's security configuration
Important Notes
Ethics and Legality:
Wireshark is a powerful tool that can capture sensitive information. The following rules apply:
-
Capture only:
- Your own traffic
- On networks you own or administer
- On the provided lab environment
-
NEVER capture:
- Other people's traffic without their explicit consent
- On public networks (café, school, company) without written authorization
- With the intent to intercept passwords or confidential information
-
Professional responsibility:
- These skills are taught for legitimate troubleshooting and analysis
- Misuse can lead to severe legal consequences
- Respect others' privacy and intellectual property
When in doubt, always ask for permission before capturing network traffic.