LAB ACTIVATED: 7 hands-on labs with real Wireshark. Follow along Wireshark Lab and you’ll learn how to use Wiresharks like professionals.

Reading about Wireshark teaches you nothing. Doing it teaches you everything.

This is a structured, hands-on Wireshark lab — seven real exercises, each with step-by-step instructions and annotated screenshots showing exactly what you should see on screen at every critical moment. No guessing. No confusion.

By the time you finish Lab 7, you will have captured live HTTP credentials, reconstructed a full TCP session, detected a port scan, analyzed DNS traffic, and extracted a file from a packet capture. These are skills used in real penetration tests and forensic investigations every day.

Before diving in, make sure you’re comfortable with how TCP, DNS, and ARP work. If not, read our Networking Basics for Hackers guide first — it will make every lab below significantly clearer.

🧪 Lab Overview
Lab 1First Live Capture
Lab 2HTTP Credential Capture
Lab 3Follow a TCP Stream
Lab 4DNS Traffic Analysis
Lab 5Detect a Port Scan
Lab 6Export Files from pcap
Lab 7Analyze Malware pcap




Lab 1 — Your First Live Capture

⏱ 10 minutes  |  Difficulty: Beginner

Objective: Start Wireshark, capture live traffic, save it as a .pcap file, and identify at least three protocols.

Step 1 — Open Wireshark and select your active interface

Launch Wireshark. The Welcome Screen shows all available network interfaces. Look for the one with a moving sparkline graph — that’s the interface actively receiving traffic.




The Wireshark Network Analyzer
FileEditViewGoCaptureAnalyzeStatisticsTelephonyWirelessToolsHelp
▶ Start
⏹ Stop
↺ Restart
📂 Open
💾 Save
Capture
…using this filter:

Wi-Fi: en0
192.168.1.5

Ethernet: eth0
Not connected

Loopback: lo
127.0.0.1

👆 What you’re looking at: The Wi-Fi interface (en0) shows an active sparkline — it’s receiving live traffic. Double-click it to start capturing. On Windows this will be labelled Wi-Fi. On Linux/Kali it will be wlan0 or eth0.

Steps 2–4 — Capture, generate traffic, and stop

Double-click the active interface. Packets begin flooding in immediately. Open your browser and visit 3 websites. Press Ctrl+E to stop, then File → Save As → name it lab1_capture.pcap.

Step 5 — Identify protocols in the Protocol column

Look at the Protocol column in the Packet List. Find at least 3 different protocols. Here’s what a typical capture looks like:




lab1_capture.pcap — Wireshark
Display Filter:

No.
Time
Source
Destination
Protocol
Len
Info

1
0.000000
192.168.1.5
8.8.8.8
DNS
74
Standard query 0x1a2b A google.com

2
0.021
8.8.8.8
192.168.1.5
DNS
106
Standard query response 0x1a2b A google.com A 142.250.80.46

3
0.024
192.168.1.5
142.250.80.46
TCP
66
49832 → 443 [SYN] Seq=0 Win=65535 Len=0

4
0.047
142.250.80.46
192.168.1.5
TCP
66
443 → 49832 [SYN, ACK] Seq=0 Ack=1 Win=65535

5
0.049
192.168.1.5
142.250.80.46
TLSv1.3
571
Client Hello

6
0.051
192.168.1.5
192.168.1.1
ARP
42
Who has 192.168.1.1? Tell 192.168.1.5

7
0.052
192.168.1.1
192.168.1.5
ARP
42
192.168.1.1 is at aa:bb:cc:dd:ee:ff

8
0.061
142.250.80.46
192.168.1.5
TLSv1.3
1400
Application Data

👆 What you’re looking at: The Protocol column shows DNS (dark blue), TCP (green), TLSv1.3 (light blue), and ARP (yellow) — four protocols identified in under 1 second of capture. Lab 1 complete ✓
✅ Lab 1 Complete when: You have a saved lab1_capture.pcap and can identify at least 3 distinct protocols in the Protocol column.



Lab 2 — Capture HTTP Credentials in Plain Text

⏱ 15 minutes  |  Difficulty: Beginner  |  ⚠ Your own machine only

Objective: Capture an HTTP POST login submission and read the username and password directly from the packet — in plain, readable text.

⚠ Lab Note: Uses testphp.vulnweb.com — a deliberately insecure site maintained by Acunetix for security training. Your own machine only.

Steps 1–2 — Start capture and submit login form

Start a new capture. Browse to http://testphp.vulnweb.com/login.php. Enter username testuser and password testpass123. Click Login. Return to Wireshark and press Ctrl+E to stop.

Step 3 — Apply the POST filter

In the display filter bar, type http.request.method == "POST" and press Enter. You’ll see the login submission packet appear:




lab2_capture.pcap — Wireshark
Display Filter:

http.request.method == “POST”


No.
Time
Source
Destination
Protocol
Len
Info

47
3.418
192.168.1.5
44.228.249.3
HTTP
412
POST /login.php HTTP/1.1 (application/x-www-form-urlencoded)

👆 What you’re looking at: Only 1 packet is shown after the filter — the POST request. Notice the Info column says “application/x-www-form-urlencoded” — that’s the form data. Click this packet to see its contents in the Details pane below.

Step 4 — Expand the HTML Form URL Encoded layer

In the Packet Details pane below the packet list, click the arrow next to “HTML Form URL Encoded” to expand it. Your credentials appear in plain text:




Packet 47 Details — Wireshark
Frame 47: 412 bytes on wire, 412 bytes captured
Ethernet II, Src: aa:bb:cc:dd:ee:ff, Dst: 11:22:33:44:55:66
Internet Protocol Version 4, Src: 192.168.1.5, Dst: 44.228.249.3
Transmission Control Protocol, Src Port: 54320, Dst Port: 80
Hypertext Transfer Protocol
POST /login.php HTTP/1.1\r\n
Host: testphp.vulnweb.com\r\n
Content-Type: application/x-www-form-urlencoded\r\n
Content-Length: 29\r\n
HTML Form URL Encoded: application/x-www-form-urlencoded
Form item: “uname” = “testuser”
Form item: “pass” = “testpass123”

uname=testuser&pass=testpass123
👆 What you’re looking at: The HTML Form URL Encoded section is expanded. The two form items show the username (“testuser”) and password (“testpass123”) in complete plain text. The raw data is also visible in the Bytes pane at the bottom. Anyone on the same unencrypted network sees exactly this.
✅ Lab 2 Complete when: You can see your submitted username and password in plain text in the HTML Form URL Encoded layer.



Lab 3 — Follow a TCP Stream

⏱ 10 minutes  |  Difficulty: Beginner

Objective: Reconstruct and read a complete HTTP conversation between your browser and a web server using Follow TCP Stream.

Steps 1–2 — Capture HTTP and filter for GET requests

Start a capture, visit http://example.com or http://testphp.vulnweb.com, then stop. Apply the filter http. Find a packet labelled GET / HTTP/1.1 in the Info column.

Step 3 — Right-click → Follow → TCP Stream




lab3_capture.pcap — Wireshark
Display Filter:

http

No.
Time
Source
Destination
Protocol
Len
Info

11
0.245
192.168.1.5
93.184.216.34
HTTP
386
GET / HTTP/1.1

Packet 11
Mark/Unmark Packet
Ignore/Unignore Packet
Copy
Follow

Decode As…
Show Packet in New Window

TCP Stream
UDP Stream
TLS Stream
HTTP Stream
HTTP/2 Stream

👆 What you’re looking at: Right-click the GET packet → select Follow → then click TCP Stream from the sub-menu that appears. This opens the full conversation window.

Step 4 — Read the reconstructed conversation

Follow TCP Stream (Stream 0)
Client (192.168.1.5:49832)
Server (93.184.216.34:80)
Stream: 0 ◀ ▶
GET / HTTP/1.1\r\n
Host: example.com\r\n
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
Accept-Language: en-US,en;q=0.5\r\n
Connection: keep-alive\r\n
\r\n

HTTP/1.1 200 OK\r\n
Content-Type: text/html; charset=UTF-8\r\n
Server: ECS (dcb/7EEA)\r\n
Content-Length: 1256\r\n
\r\n
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset=”utf-8″ />
<style type=”text/css”> … </style>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples …</p>
</div>
</body>
</html>
👆 What you’re looking at: Red text = your browser’s request (GET headers, User-Agent, Accept headers). Blue text = the server’s full response (HTTP 200 OK + complete HTML source). This is the entire conversation reconstructed. Use the Stream number arrows at the top right to browse different conversations.
✅ Lab 3 Complete when: You’ve opened a TCP Stream window and can identify request headers (red) and the HTML response (blue).



Lab 4 — DNS Traffic Analysis

⏱ 15 minutes  |  Difficulty: Beginner–Intermediate

Objective: Capture and analyze DNS queries and responses. Understand what DNS traffic reveals — and learn to spot C2 beaconing patterns. This pairs directly with DNS Reconnaissance with dnsrecon, where you use these same insights offensively.

Steps 1–3 — Capture DNS and identify queries vs responses

Start a capture. Apply the dns filter. Visit 5 different websites. Look at the Info column — Standard query = outbound, Standard query response = answer.




lab4_capture.pcap — Wireshark
Display Filter:

dns

No.
Time
Source
Destination
Proto
Len
Info

1
0.000
192.168.1.5
8.8.8.8
DNS
74
Standard query 0xa1b2 A google.com

2
0.021
8.8.8.8
192.168.1.5
DNS
106
Standard query response 0xa1b2 A google.com A 142.250.80.46

3
0.485
192.168.1.5
8.8.8.8
DNS
74
Standard query 0xc3d4 A github.com

4
0.503
8.8.8.8
192.168.1.5
DNS
90
Standard query response 0xc3d4 A github.com A 140.82.121.4

5
1.210
192.168.1.5
8.8.8.8
DNS
74
Standard query 0xe5f6 A bbc.com

6
1.232
8.8.8.8
192.168.1.5
DNS
102
Standard query response 0xe5f6 A bbc.com A 151.101.0.81

👆 What you’re looking at: Every pair of packets = one DNS lookup. No. 1 (query) = your machine asking “what’s the IP for google.com?” No. 2 (response) = the answer: 142.250.80.46. Expand the Answers section in any response packet to see the resolved IP. Notice how each website visit generates multiple DNS lookups (tracking pixels, CDNs, analytics).
✅ Lab 4 Complete when: You can tell DNS queries from responses and read the resolved IP from an Answers section.



Lab 5 — Detect a Port Scan in Wireshark

⏱ 15 minutes  |  Difficulty: Intermediate  |  ⚠ Localhost only

Objective: Generate a port scan against your own localhost using Nmap, capture it in Wireshark, and identify the SYN packet signature. Keep our Nmap Cheat Sheet open in a second tab — you’ll use several commands from it here.

⚠ Requirements: Nmap installed. Kali Linux: pre-installed. Windows/macOS: download from nmap.org. Scan 127.0.0.1 only.

Steps 1–2 — Capture on Loopback, run the Nmap scan

Start Wireshark on the Loopback (lo) interface. Apply the filter tcp. Open a terminal and run:

nmap -sS 127.0.0.1

Step 3 — Apply the SYN scan filter

Stop the capture. Apply this filter:

tcp.flags.syn == 1 and tcp.flags.ack == 0




lab5_portscan.pcap — Wireshark
Display Filter:

tcp.flags.syn == 1 and tcp.flags.ack == 0

No.
Time
Source
Destination
Proto
Len
Info

1
0.000
127.0.0.1
127.0.0.1
TCP
58
47291 → 21 [SYN] Seq=0 Win=1024 Len=0

2
0.000
127.0.0.1
127.0.0.1
TCP
58
47291 → 22 [SYN] Seq=0 Win=1024 Len=0

3
0.001
127.0.0.1
127.0.0.1
TCP
58
47291 → 80 [SYN] Seq=0 Win=1024 Len=0

4
0.001
127.0.0.1
127.0.0.1
TCP
58
47291 → 443 [SYN] Seq=0 Win=1024 Len=0

5
0.001
127.0.0.1
127.0.0.1
TCP
58
47291 → 3306 [SYN] Seq=0 Win=1024 Len=0

6
0.002
127.0.0.1
127.0.0.1
TCP
58
47291 → 8080 [SYN] Seq=0 Win=1024 Len=0

7
0.002
127.0.0.1
127.0.0.1
TCP
58
47291 → 8443 [SYN] Seq=0 Win=1024 Len=0

👆 What you’re looking at: The filter tcp.flags.syn==1 and tcp.flags.ack==0 shows only SYN probes. Notice the Destination port changes with every packet (21, 22, 80, 443, 3306, 8080…) while the source stays the same — this is the unmistakable fingerprint of a port scan. The packet Win=1024 is also characteristic of Nmap’s default SYN scan.

Step 4 — Find open ports with the SYN-ACK filter

Now change the filter to see which ports responded with SYN-ACK (open port confirmation):

tcp.flags.syn == 1 and tcp.flags.ack == 1

Each SYN-ACK = one open port. Compare the destination ports shown here with Nmap’s terminal output — they should match exactly.

📖 Go deeper: Lab 5 shows the defender’s view of a scan in Wireshark. To understand the attacker’s perspective, work through our Network Scanning Tutorial — Port Scanning Techniques Deep Dive. Together they give you the complete 360° picture.
✅ Lab 5 Complete when: You can see SYN probes with changing destination ports, and identify at least one SYN-ACK confirming an open port.



Lab 6 — Export a File from a Packet Capture

⏱ 10 minutes  |  Difficulty: Intermediate

Objective: Extract a file transmitted over HTTP directly from a .pcap using Wireshark’s Export Objects feature — the same technique used in forensic investigations.

Steps 1–2 — Download a practice pcap and open it

Download http.cap from wiki.wireshark.org/SampleCaptures. Open via File → Open. Apply the http filter to confirm it contains HTTP traffic.

Step 3 — Go to File → Export Objects → HTTP

Wireshark · Export HTTP object list from http.cap
Total objects: 7  |  Select an item to preview, Save to extract one file, Save All to extract everything
Pkt
Hostname
Filename
Size
Type

4
www.ethereal.com
/download.html
4.2 kB
text/html

11
www.ethereal.com
/ethereal.css
1.8 kB
text/css

16
www.ethereal.com
/ethereal-logo.png
8.4 kB
image/png

28
www.ethereal.com
/nav-home.gif
1.1 kB
image/gif

31
www.ethereal.com
/nav-download.gif
1.3 kB
image/gif

35
www.ethereal.com
/background.jpg
22.1 kB
image/jpeg

42
www.ethereal.com
/analytics.js
3.2 kB
application/js

Help
Close
Save
Save All

👆 What you’re looking at: The Export HTTP Objects dialog shows every file transferred in the capture — HTML pages, CSS, images, JavaScript. Row 16 (ethereal-logo.png, selected in blue) is an image file. Click it and press Save to extract it directly from the network traffic recording. Press Save All to extract every file at once into a folder.
✅ Lab 6 Complete when: You’ve opened the Export Objects dialog and saved at least one image file extracted from the pcap.



Lab 7 — Analyze a Real Malware pcap

⏱ 20 minutes  |  Difficulty: Intermediate–Advanced

Objective: Identify infected host, C2 server, beaconing behavior, and suspicious DNS. Before starting, read What Is Malware and how it infects computers — understanding malware behavior makes these traffic patterns immediately recognizable.

⚠ Safety Note: Download a pcap from malware-traffic-analysis.net. Zip password: infected. The file contains recorded traffic only — no executable code.

Step 2 — Check Protocol Hierarchy (Statistics menu)

Open the pcap. Go to Statistics → Protocol Hierarchy. This reveals the full breakdown of every protocol in the capture instantly:

Wireshark · Protocol Hierarchy Statistics
Protocol
%Pkts
Activity
Packets

▼ Frame
100.0%
8,451

▼ Ethernet
100.0%
8,451

▼ IPv4
98.2%
8,299

▼ TCP
71.4%
6,034

  HTTP
8.2%
693

⚠  Data (port 4444)
12.1%
1,023

▼ UDP
26.8%
2,265

  DNS
26.8%
2,265

👆 What you’re looking at: The anomaly is immediately visible — TCP traffic on port 4444 (highlighted red) represents 12.1% of all packets. Port 4444 is a classic Metasploit reverse shell port. This is your first indicator of compromise. Normal browsing would never generate this much traffic on an unusual port. Also note the very high DNS volume (26.8%) — abnormal for a typical workstation.

Steps 3–6 — Find infected host, C2 DNS, and beaconing

Find infected host: Statistics → Endpoints → IPv4 → sort by Bytes. The internal IP (192.168.x.x) with most outbound traffic = infected host.

Find C2 via DNS filter: Apply dns and ip.src == [infected IP]. Look for random domain names (e.g. xkf93nd.top) — DGA malware domains.

Detect beaconing: Apply ip.src == [infected IP] and tcp. Look at the Time column for outbound connections to the same external IP repeating at fixed intervals (e.g. every 60 seconds) — that is your C2 beacon.

Follow the C2 stream: Right-click a beacon packet → Follow → TCP Stream. If the C2 traffic is unencrypted you may read commands or exfiltrated data in the stream window (same red/blue format as Lab 3).

✅ Lab 7 Complete when: You’ve identified the infected host IP, at least one suspicious DNS query, and evidence of beaconing behavior (repeated timed connections to an external IP).

Lab-Ready Filter Reference Card

# ── PROTOCOL BASICS ─────────────────────────────
http                             # HTTP only (Labs 2, 3, 6)
dns                              # DNS queries & responses (Lab 4)
tcp                              # All TCP (Labs 3, 5)

# ── LAB 2 — Credential Capture ──────────────────
http.request.method == “POST”     # Form submissions only

# ── LAB 4 — DNS Analysis ────────────────────────
dns and dns.flags.response == 0   # Outbound queries only
dns and dns.flags.response == 1   # Inbound responses only

# ── LAB 5 — Port Scan Detection ─────────────────
tcp.flags.syn==1 and tcp.flags.ack==0   # SYN scan probes
tcp.flags.syn==1 and tcp.flags.ack==1   # Open port SYN-ACK responses

# ── LAB 7 — Malware Analysis ────────────────────
ip.src == X.X.X.X                   # Isolate infected host
dns and ip.src == X.X.X.X           # DNS from infected host
ip.src == X.X.X.X and tcp           # TCP from infected host (beaconing)

# ── NOISE REDUCTION (all labs) ──────────────────
not arp and not dns                 # Hide broadcast noise


Common Lab Mistakes — And How to Fix Them

“I can’t see HTTP in Lab 2”

Modern browsers auto-redirect to HTTPS. Use curl instead: curl -d "uname=test&pass=test" http://testphp.vulnweb.com/userinfo.php while capturing.

“Loopback interface doesn’t appear in Lab 5”

On Windows, reinstall Npcap with “Support loopback traffic” checked. On Linux/macOS, the loopback lo interface appears by default.

“Export Objects shows nothing in Lab 6”

Export Objects only works with HTTP (not HTTPS). Apply filter http first to confirm the pcap contains HTTP traffic.

“Can’t find infected host in Lab 7”

Statistics → Conversations → IPv4 → sort by Bytes B→A. The internal RFC 1918 IP (192.168.x.x / 10.x.x.x) receiving the most inbound data from external IPs = infected machine.


Frequently Asked Questions

❓ Do I need prior knowledge to start?
No. Lab 1 assumes zero experience. Each lab builds logically on the previous one. If a step is unclear, re-read it — every instruction is written to be unambiguous, and the screenshots show exactly what you should see.
❓ Are these labs safe to run on my personal computer?
Labs 1, 3, 4, 6, and 7 capture or analyze traffic only — completely safe. Lab 2 visits a dedicated training site. Lab 5 scans only 127.0.0.1 (your own localhost) — it cannot affect other machines.
❓ Which labs are most relevant for CEH and Security+ exams?
Labs 2, 4, and 5 map most directly to CEH and CompTIA Security+ exam objectives. Lab 5’s SYN scan detection is especially heavily tested — recognizing the packet signature in a capture appears in both certifications’ practical components.
❓ How do I decrypt HTTPS in Wireshark for practice?
Set the environment variable SSLKEYLOGFILE to a file path before launching Chrome or Firefox. In Wireshark: Edit → Preferences → Protocols → TLS → point “Pre-Master-Secret log” to that file. Wireshark will automatically decrypt all sessions from that browser.

You Just Did What Most People Only Read About

Seven labs. Live credentials captured. TCP sessions reconstructed. A port scan detected. Malware traffic analyzed. These are the exact workflows used by security engineers and ethical hackers in real jobs every day.

Save your pcap files. Repeat any lab that felt unclear. The next level is waiting.

✔ All 7 Labs — Completion Checklist

Lab 1 ✓   Saved lab1_capture.pcap, identified 3+ protocols

Lab 2 ✓   Captured HTTP POST credentials in plain text

Lab 3 ✓   Reconstructed full conversation via Follow TCP Stream

Lab 4 ✓   Analyzed DNS queries and identified beaconing patterns

Lab 5 ✓   Detected SYN scan, matched open ports to Nmap output

Lab 6 ✓   Extracted a file from pcap using Export Objects

Lab 7 ✓   Identified infected host, C2 DNS, and beacon pattern

LEAVE A REPLY

Please enter your comment!
Please enter your name here