Wireshark
π§ Tool Note β Category: Network Analysis | Open Source
π Quick Overview
What is it? Open-source network protocol analyser for capturing and inspecting network traffic in real-time.
Official Website: https://www.wireshark.org/ License: GNU GPLv2 (Free) Used in: CSF & NS, EHPT, DFIR
π― What Problem Does It Solve?
- See exactly whatβs happening on a network at the packet level
- Identify cleartext credentials, malicious traffic, data exfiltration
- Reconstruct attack timelines from network captures
- Verify encryption and security controls
βοΈ How It Works
Wireshark is a GUI on top of a packet-capture library β it doesnβt generate traffic, it copies packets the network card sees:
NIC β capture driver (libpcap/npcap) β promiscuous mode β capture buffer β
dissectors decode each layer β display (with filters) β pcap file
- Capture library:
libpcap(Linux/macOS) orNpcap(Windows) taps the interface below the OS network stack and copies raw frames. - Promiscuous mode: normally a NIC ignores frames not addressed to it; promiscuous mode tells it to keep all frames it sees. (On Wi-Fi, monitor mode goes further and captures raw 802.11 management/other-device frames.)
- Dissectors: Wireshark peels each packet layer by layer (Ethernet β IP β TCP β HTTPβ¦), one dissector per protocol, turning bytes into the readable tree you click through.
- TCP stream reassembly: a single HTTP response is split across many packets; Wireshark can stitch them back β Follow β TCP Stream shows the full conversation (this is how you read HTTP credentials/POST data).
Two filter types β donβt confuse them:
| Capture filter | Display filter | |
|---|---|---|
| When | before capture (BPF syntax) | after capture |
| Purpose | limit whatβs recorded | limit whatβs shown |
| Example | tcp port 80 | http.request.method == "POST" |
| Reversible? | No β dropped forever | Yes β just re-type |
Why it sees cleartext: if traffic isnβt encrypted (HTTP, FTP, Telnet, DNS), the payload is right there in the packets β thatβs why the labs recover HTTP form credentials, and why HTTPS/TLS matters (see OSI Model & TCP-IP Security).
π Key Features
- Live packet capture on any interface
- Deep inspection of hundreds of protocols
- Powerful display filter engine
- TCP/UDP stream reconstruction
- Protocol hierarchy statistics
- Export objects (files transferred over HTTP/SMB)
- Read/write pcap and pcapng files
π¬ Common Display Filters
ip.addr == 192.168.1.10 # any traffic to/from this host
tcp.port == 80 # by port
http # only HTTP
dns # only DNS queries/responses
http.request.method == "POST" # form submissions (creds!)
tcp.flags.syn == 1 && tcp.flags.ack == 0 # SYN packets (scan/handshake starts)
tcp.analysis.retransmission # network trouble / oddities
Analyse workflow: apply filter β right-click a packet β Follow β TCP Stream β read the conversation. Statistics β Protocol Hierarchy and Conversations summarise whatβs on the wire.
β οΈ Gotchas / Limitations
- Encrypted traffic (HTTPS/TLS) shows only metadata (IPs, SNI, cert) β not payload, unless you supply session keys (
SSLKEYLOGFILE). - Capturing needs privileges; on Linux add yourself to the
wiresharkgroup (see install) rather than running as root. - On a switched network you only see your own traffic + broadcast unless you use a SPAN/mirror port or tap β a switch isnβt a hub.
- Huge captures are memory-heavy; use capture filters to keep files manageable.
- Capturing traffic youβre not authorised to monitor can be illegal β only capture on networks you own/are permitted to.
π» Installation
# Linux
sudo apt install wireshark
# Allow non-root capture:
sudo usermod -aG wireshark $USER
# Kali Linux β pre-installedβ‘ Quick Reference
β Wireshark Commands Cheatsheet
π Related Notes
- Network Traffic Analysis
- Network & Email Forensics
- Nmap β Complements Wireshark for network analysis