βœ“
cli v4.4.x open source Actively Maintained

TShark

Terminal-oriented Wireshark packet analyzer for automated protocol dissection and high-speed PCAP field extraction

// At a Glance
Category
Network Monitoring
Platforms
linux, macos, windows
Pricing / License
GPL-2.0
Focus / Scope
2 MITRE Tactics

πŸ“‹ Tool Overview & Technical Brief

TShark - Live Application Interface

Overview & Engineering Philosophy

TShark is the command-line sibling of Wireshark, sharing the exact same deep protocol dissection engine (over 3,000 protocols) without any graphical UI overhead. Where Wireshark excels at interactive deep-dive packet tracing, TShark is purpose-built for headless server capture, pipeline filtering, and automated telemetry extraction from gigabyte-scale PCAP files.

Security analysts rely on TShark's display filters and -T fields extraction mode to transform massive raw packet captures into clean CSV, JSON, or Elastic-ready logs in seconds.


Key Capabilities & Technical Highlights

  • Full Wireshark Dissector Parity: Parses HTTP/2, DNS, SMB3, Kerberos, TLS JA3/SNI, and industrial ICS protocols directly from the shell.
  • Structured Field Extraction (-T fields / -T ek): Exports arbitrary protocol fields (ip.src, dns.qry.name, tls.handshake.extensions_server_name) for instant Unix sort | uniq -c aggregation.
  • Capture & Display Filters: Combines kernel-level BPF capture filtering with rich post-capture Wireshark display expressions.
  • On-the-Fly Object Export: Extracts HTTP payloads, SMB files, and TLS certificates straight from PCAP archives (--export-objects).
  • Ring Buffer Capture Mode: Captures continuous rolling network telemetry safely without exhausting disk space on edge sensors.

Step-by-Step Tutorial & Practical CLI Workflows

# 1. Extract top queried DNS domains from a multi-gigabyte PCAP capture
tshark -r capture.pcap -Y "dns.flags.response == 0" -T fields -e dns.qry.name | sort | uniq -c | sort -rn | head -n 25

# 2. Inspect TLS SNI hostnames and X.509 certificate subjects for anomalous outbound beacons
tshark -r capture.pcap -Y "tls.handshake.type == 1" -T fields -e ip.src -e ip.dst -e tls.handshake.extensions_server_name

# 3. Extract all HTTP transferred files automatically into an isolated output directory
tshark -r capture.pcap -Q --export-objects http,./carved_http_objects

# 4. Run continuous ring-buffer packet capture rotating every 250MB (10 files max)
sudo tshark -i eth0 -b filesize:256000 -b files:10 -w /var/captures/edge_sensor.pcapng

Real-World Operational Context

Network forensics engineers use TShark immediately after TCPDump capture to triage large PCAP captures remotely over SSH, spot anomalous DNS tunneling or C2 beaconing patterns, and carve suspicious HTTP/SMB transfers before importing targeted time windows into Wireshark or NetworkMiner.

⚑ Installation & Quick Start

sudo apt update && sudo apt install -y tshark
brew install --cask wireshark
sudo dnf install -y wireshark-cli
winget install WiresharkFoundation.Wireshark
>_ Inspect via Terminal API (ToolWar v1)
curl -fsSL https://toolwar.com/api/v1/tools/tshark/install

πŸ’¬ Discussion & Community Field Notes

0 comments
No reviews or comments yet. Be the first to share operational field notes!

Specification Matrix

Status
active
License / Model
GPL-2.0
Type
cli
Supported Platforms
linux macos windows
Maintenance
actively maintained
Community Rating
β˜… Unrated (0)
Total Views
2
Last Verified
Nov 2026
Curated By
ToolWar Research Team

Maintainer Badge

Listed on ToolWar badge

Add this verified ToolWar badge to your repository README or project documentation.

Rate This Tool

Help fellow researchers evaluate tool effectiveness

Click a star to submit rating Registering rating... βœ“ Rating registered! Average: ( votes)