Win In Life Academy

Beginner’s Guide to Use Wireshark for Penetration Testing  

Share This Post on Your Feed 👉🏻

If you’re starting penetration testing, Wireshark is one of the first tools you need to understand. Pentesting depends on knowing how a network behaves who is talking to whom, what data is moving, and where weak points exist. You can’t identify vulnerabilities if you can’t see the traffic beneath the surface. 

Wireshark solves that problem. It gives you live, detailed visibility into network communication so you can spot insecure protocols, strange patterns, or potential attack paths. This visibility becomes the base for almost every pentesting technique you’ll learn later. 

In this guide, we’ll walk through Wireshark step by step, explain how to use it during pentesting, and highlight the best practices beginners should follow. 

Wireshark is a tool that lets you see the data your computer sends and receives across a network. Every time you open a website or use an app, packets of information move in the background. Wireshark captures those packets and turns them into a readable format. 

At its core, Wireshark works as a wireshark packet sniffer, capturing raw network packets in real time and breaking them down into readable layers so security professionals can understand exactly what data is being transmitted. 

Wireshark is widely used in cybersecurity because it gives clear, real-time visibility to how devices communicate.  

Since it’s free, open-source, and available on all major operating systems, Wireshark is used by pentesters, SOC teams, incident responders, malware analysts, and network engineers. Its strength lies in its ability to turn raw traffic into insights that help you understand, secure, and troubleshoot networks effectively. 

Wireshark

As a wireshark network analyzer, the tool helps pentesters observe real network behavior, identify insecure communication, and validate whether vulnerabilities actually exist at the packet level. 

Wireshark is essential for pentesting because it gives you visibility no other tool can. It reveals real network behavior, uncovers weak configurations, exposes unsafe data transmission, and shows unusual patterns attackers rely on. 

Network traffic analysis using tools like Wireshark plays a key role in penetration testing and security validation, as highlighted in industry frameworks such as the OWASP Testing Guide and NIST security testing standards. 

The use of outdated TLS versions and cleartext protocols is considered a major security risk, as outlined in NIST and OWASP security guidelines, because they expose sensitive data to interception. 

Networks often contain forgotten devices: old printers, outdated servers, test machines, or IoT devices. Wireshark detects ARP requests, service broadcasts, and discovery packets that reveal weak, unpatched devices attackers often target first. 

Issues like outdated TLS versions, invalid certificates, repeated retransmissions, or unnecessary broadcasts expose vulnerabilities. Wireshark reveals these patterns inside packet flows with concrete evidence. 

Attacks such as ARP spoofing and man-in-the-middle techniques are well-documented in the MITRE ATT&CK framework and are commonly validated using packet capture tools like Wireshark. 

Wireshark allows for saving packets, screenshots, and full captures. Showing a real packet with sensitive data or insecure behavior is more convincing than any explanation, helping you justify findings and produce professional pentest reports. 

Wireshark visualizes abstract networking concepts. You can observe TCP handshakes, DNS queries, ARP broadcasts, TLS negotiations, and retransmissions—building strong intuition about normal and abnormal behavior. 

This guide is designed as a Wireshark tutorial for beginners, focusing on practical, real-world pentesting use cases. 

Head over to the official Wireshark website and choose your platform (Windows, macOS, or Linux) to download the installer. 

When installing, you’ll be asked to install Npcap—accept it. This component allows Wireshark to capture packets. Enable “WinPcap Compatibility Mode” if prompted. 

Install Wireshark by dragging it into the Applications folder. After installation, approve the network extension prompt so Wireshark can access your network interfaces. 

Use your package manager to install Wireshark. After installation, add your user to the wireshark group: 

sudo usermod -aG wireshark $USER 

Log out and log back in for changes to take effect. 

Running Wireshark as root is a security risk. Adding your user to the wireshark group gives you capture privileges without unnecessary risk—standard practice in professional pentesting. 

When you open Wireshark, you’ll see a list of interfaces. Wireshark can only capture packets from the interface you choose. 

Each interface has a live graph showing current activity. Open a webpage or run a ping and watch which graph spikes—that’s your active interface. 

Use when you know exactly what you’re testing: 

host 192.168.1.10        # Only this IP 
port 80                  # Only HTTP 
tcp port 22              # Only SSH 
udp port 53              # Only DNS 
not broadcast and not multicast  # Ignore noise

Use during analysis to explore from different angles: 

http                     # Unencrypted web traffic 
tls                      # Encrypted sessions 
dns                      # Domain lookups 
arp                      # Device discovery 
http.request.method == “POST”    # Login attempts 
ip.addr == 192.168.1.10          # Specific device 
tcp.flags.syn == 1 and tcp.flags.ack == 0  # Port scans

Capture filters = what gets saved. Display filters = what you see. 

Learning wireshark filters is one of the most important skills for beginners because filters help reduce noise and allow you to focus only on security-relevant traffic during analysis. Click the blue shark-fin icon to begin capturing. Create simple actions to understand the traffic: 

  • Opening a website shows DNS lookups, TCP handshakes, HTTP/HTTPS traffic 
  • Logging into a test app creates POST requests and authentication traffic 
  • Running a ping shows clear ICMP packets 

Before testing attacks, capture normal behavior first. Perform typical activities for 30-60 seconds, then save as baseline_normal_browsing.pcapng. Later, compare attack traffic against this baseline to see what changed. 

The Packet List displays captured packets with key columns: 

Source — IP address of the sender 

  • Light purple = TCP traffic 
  • Light blue = UDP traffic 
  • Black = Packets with errors 
  • Light green = HTTP traffic 
  • Dark blue = DNS traffic 

TCP Three-Way Handshake: 

  1. SYN — “I want to connect” 
  1. SYN, ACK — “OK, let’s connect” 
  1. ACK — “Connection established” 

DNS Query: 

  1. Standard query A example.com 
  1. Standard query response A 93.184.216.34 
  • Repeated SYN packets with no response = port scan or firewall blocking 
  • Multiple ARP requests for same IP = possible spoofing 
  • DNS queries to unusual domains = potential malware 
  • HTTP on non-standard ports = evasion attempts 

http — Test if sensitive data is transmitted without encryption 
tls — Check for weak TLS versions or insecure cipher suites 
dns — See which domains the target communicates with 
arp — Map devices or detect spoofing 
http.request.method == “POST” — Isolate login attempts 
ip.addr == 192.168.1.10 — Focus on one device 
tcp.flags.syn == 1 and tcp.flags.ack == 0 — Detect port scans 
!(arp or icmp or dns) — Hide noisy protocols 
ip.dst == 192.168.1.50 and http.request.method == “POST” 

Shows only POST requests to your target server. 

Click any packet to see its layers: 

  • SYN = Connection initiation 
  • ACK = Normal communication 
  • RST = Port closed or filtered 
  • FIN = Connection termination 
  • PSH = Immediate data push 

Shows raw hex and ASCII. When you click on a field in Packet Details, Wireshark highlights the corresponding bytes below useful for finding hidden or encoded data. 

Right-click any packet and select Follow > TCP Stream (or HTTP/UDP/TLS Stream). 

A new window shows the complete conversation: 

  • Red text = Data you sent 
  • Blue text = Data the server sent back 

If you control the client/server: 

  1. Set environment variable: export SSLKEYLOGFILE=~/ssl-keys.log 
  1. In Wireshark: Edit > Preferences > Protocols > TLS 
  1. Point to your key log file 

Now TLS streams decrypt to show plaintext HTTP. 

Save Evidence: 

Click Save as... to export streams as login_plaintext_credentials.txt 

Filter: http.request.method == “POST” 

Follow HTTP Stream. If you see: 

username=admin&password=test123 

Critical vulnerability—credentials can be intercepted on any shared network

Filter: tls.handshake.type == 1 

Check Transport Layer Security > Handshake Protocol > Version 

If you see TLS 1.0 (0x0301) or TLS 1.1 (0x0302), or weak ciphers like RC4, DES, 3DES, or EXPORT ciphers—the connection is vulnerable to downgrade attacks. 

Filter: http.cookie or http.authorization 

If session tokens appear over HTTP or in URL parameters (GET /dashboard?token=secret123), session hijacking is trivial. 

Filters: ftp, telnet, smb 

FTP and Telnet transmit credentials in plaintext. SMBv1 is vulnerable to EternalBlue. These protocols should be replaced immediately. 

Filter: arp 

If you see two different MAC addresses claiming the same IP: 

192.168.1.1 is at aa:bb:cc:dd:ee:ff 
192.168.1.1 is at 11:22:33:44:55:66 

6. DNS Anomalies 

Filter: dns 

If google.com resolves to 192.168.1.50 instead of Google’s actual IP—DNS spoofing. 

Long random subdomains like a3d8f2b9e1c4.malicious.com indicate potential DNS tunneling for data exfiltration. 

Capture baseline ARP traffic, note gateway MAC. Run your spoofing tool, capture it again. If the gateway’s IP now shows your MAC address, and victim traffic flows through your interface—attack succeeded. 

Capture during an attack. Filter dns. If victim’s query for login.bank.com returns your fake IP instead of the legitimate one—spoofing worked. 

Verifying Session Hijacking: 

During MITM, capture victims’ HTTP traffic. Filter http.cookie, extract session ID, inject into your browser. If you access authenticated pages without logging in—hijacking succeeded. 

Craft packet with Scapy, capture on target network. Filter ip.dst == 192.168.1.10 and tcp.flags.syn == 1. If your SYN packet appears and target sends SYN-ACK back—injection worked. 

See what protocols were used and their percentages. High HTTP when expecting HTTPS = unencrypted communication problems. 

Shows which IPs exchanged the most data. Unexpected external IPs with large transfers = possible data exfiltration. 

Lists all devices with packet counts. Discover hidden hosts, unauthorized devices, or compromised systems. 

Visualize traffic over time. Sudden spikes reveal port scans, file transfers, or attack attempts. Periodic bursts indicate C2 beaconing. 

List all URLs accessed. Instantly reveals admin panels, API endpoints, and accessible config files. 

File > Export Objects > HTTP 

Extracts all files, images, scripts, and objects transferred over HTTP. Useful for: 

  • Examining uploaded files 
  • Retrieving malware samples 
  • Finding credentials in config files 
  • Analyzing JavaScript for hidden functionality 

You can also export from SMB, DICOM, and IMF protocols. 

Apply display filter → File > Export Specified Packets → Select Displayed → Save as plaintext_login_credentials.pcapng 

In Follow Stream window → Save as… → Choose ASCII or Raw → Name clearly 

Capture the packet list, packet details with vulnerability expanded, and follow stream windows. Highlight critical fields, including packet numbers and timestamps. 

  • Packet number 
  • Timestamp 
  • Filter used 
  • Description (what you found) 
  • Impact (why it matters) 
  • Recommendation (how to fix) 

Exercise 1: Capture login on testphp.vulnweb.com, filter http.request.method == “POST”, check for plaintext credentials 

Exercise 2: Browse websites while capturing, filter dns to see background requests 

Exercise 3: Visit HTTPS site, filter tls.handshake.type == 1, examine TLS versions and ciphers 

Exercise 4: Capture Wi-Fi traffic, filter arp, observe normal device announcements 

Exercise 5: Compare same site over HTTP vs HTTPS to see encryption difference 

Exercise 6: Set up Kali + Metasploitable VMs, perform ARP spoofing, verify victim traffic flows through you 

Exercise 7: Run Nmap, filter tcp.flags.syn == 1 and tcp.flags.ack == 0 to see port scan traffic 

Exercise 8: Capture login, extract session cookie, inject into incognito window, verify session hijacking 

Check activity graphs—choose the interface that spikes when you perform an action. 

When you know your target, use host 192.168.1.10 or port 80 to keep files small. 

Start broad (http), then narrow (http.request.method == “POST”). Display filters don’t delete data. 

Capture normal traffic first, save it, then compare attack traffic against baseline to see changes. 

Take short, focused captures. Use clear filenames like arp_spoof_mitm_verification.pcapng. 

Use sudo usermod -aG wireshark $USER instead. Log out and back in. 

Instead of jumping between packets, view complete conversations in one window. 

Save packets, screenshots, and streams right when you find issues. Include packet numbers, timestamps, and clear explanations. 

Never trust that a tool worked. Capture traffic and confirm results objectively. 

Use home labs with VMs, legal platforms (HackTheBox, TryHackMe), or employer-authorized environments only. 

Wireshark is not just a packet capture tool. It’s how cybersecurity professionals prove what is actually happening on a network. During penetration testing, assumptions don’t matter. Evidence does. Wireshark gives you that evidence at the packet level.  

Reading about filters and protocols is easy. Using Wireshark in real traffic, spotting weak encryption, validating attacks, and extracting proof for reports is where most beginners struggle. That gap is closed only through hands-on analysis, not theory. In real-world pentesting, Wireshark is never used alone. It works alongside tools like Nmap, Burp Suite, Metasploit, and Nessus to confirm findings, validate exploits, and document vulnerabilities clearly. Knowing how these tools connect is what separates learners from practitioners. 

Our Cybersecurity Course and Ethical Hacking programs at Win in Life Academy focus on exactly this: real attack scenarios, real traffic, real analysis. You don’t just “use” Wireshark. You learn how to think with it, verify results, and report findings the way professionals do. If you want to move beyond tutorials and actually become job-ready in cybersecurity, start practicing the way the industry works. Stop just reading about security—start building the skills that get you hired. 

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Get updates and learn from the best

Please confirm your details

Call Now Button