· 9 min read
How to Use Wireshark with AI: tshark Output, Filters and Streams
Use Wireshark with Odin v1: paste tshark summaries, get display filters you can test, explain a suspicious stream, and check statistics the model gets wrong.
Wireshark can show you every packet on the wire, but it will not tell you which ten of the 400,000 packets matter. The usual path is a filter you half remember, a lot of scrolling and a search for "wireshark filter for ..." in another tab. A language model is a good partner for that loop: it can read a summary, suggest where to look, write the display filter and explain a stream in plain words. This guide shows how to use Odin v1 with Wireshark and its command line sibling tshark, and where you must compute or check things yourself.
What the model sees, and what it does not
Odin accepts text only. It cannot open a .pcap or .pcapng file, and it is not connected to Wireshark. You work from text that tshark prints, and you paste that text into the web chat or an API call. This is a better habit than it sounds: a summary of a few dozen lines is something the model can read well, while a raw capture is not.
Two things to settle before you paste anything:
- Capture only traffic you are authorized to capture. Your own machine, a lab, or a network where you have written permission. Capturing other people's traffic without authorization can be illegal, however useful the capture would be.
- Redact before you paste. A capture holds passwords sent over HTTP, FTP or Telnet, session cookies, email addresses, internal hostnames and IP addresses. API prompts and completions are not stored, but there is no reason to send what the analysis does not need. Replace real addresses with placeholders, and remove credentials and cookies from any stream you paste.
odin-v1 has a 1,000,000-token context window, but summaries get better answers than dumps. Aim for the part of the capture that answers your question.
Step 1: paste the summaries, not the packets
Start with the overview that tshark can print without showing a single payload. The protocol hierarchy shows what the capture is made of:
A trimmed synthetic example, written for this article:
Add the conversation tables for the protocols that matter, which list who talked to whom and how much:
Then ask the model to read them:
You are assisting a network analyst on an authorized investigation. Below are the protocol hierarchy and conversation tables from a packet capture of one workstation, with real addresses replaced by placeholders. Describe what this host was doing, which conversations are unusual in volume or protocol and why, and what I should look at next. Mark anything you cannot tell from these numbers as a guess.
A good answer reads the numbers as numbers. It might point out that 213 DNS frames are a small share of the traffic and look normal in size, that one TCP conversation moved far more bytes than the others, and that the 12 plain HTTP frames are worth a look because they are readable. It should also say what these summaries cannot tell it, such as what was inside the TLS traffic.
Step 2: ask for display filters, and test each one
The model turns a question into a filter faster than you can look up the field name. Describe the packets you want and the version of Wireshark you use:
Write Wireshark display filters, not capture filters, for: DNS queries only, TCP connection attempts that got no answer, HTTP requests to a specific host, and TLS client hellos with the server name shown. Give one line per filter with a one-sentence explanation.
Expect filters in this shape:
Do not trust any of them until a tool has accepted them. Paste each into the Wireshark filter bar, where the bar turns green for valid syntax and red for invalid, or check from the command line. tshark prints an error for a filter it cannot parse:
A valid filter is not the same as a correct one. The second filter above matches every first SYN, including successful connections. To find attempts that got no answer, you also need to compare them with the SYN-ACK packets. Ask the model what a filter does not match, and test it on a few packets you can verify by eye.
Step 3: explain a suspicious stream
Once a conversation stands out, extract that one TCP stream as text:
The final number is the stream index, which you can find in Wireshark under Analyze > Follow > TCP Stream or by filtering on tcp.stream. Redact it before pasting, because this output is the payload. Then ask for an explanation:
Below is one TCP stream from a packet capture, with credentials and personal data removed. Explain what protocol this is, what each side is doing, and whether anything looks like command and control, data transfer or a scan. Quote the lines your conclusions come from, and say what you cannot tell from this text.
For plain-text protocols, the model is useful here. It will recognize an HTTP exchange, an FTP login, an SMTP session or a simple beacon, and it can explain a header or a response code you have not seen before. Ask it to quote the evidence, then find each quote in the stream yourself.
Step 4: extract fields and ask for a judgment
Reading a stream does not scale to 400,000 packets. Pull one column out of the capture and ask a focused question about it. Here is every DNS query name with the time and source address:
Wireshark can also pull out other fields the same way, such as http.host, tls.handshake.extensions_server_name for the requested server name in a TLS handshake, or ip.dst with tcp.dstport. Do the counting with a script, not with the model, and give the model the result. This short Python script counts queries per domain and reports the longest first label:
Run on the synthetic capture used for this article, it prints:
Paste that table and ask the model to judge it:
Here are DNS query counts per domain from one workstation, with the length of the longest first label. Which domains look normal and which look like possible DNS tunneling or beaconing, and why? List what I should check to confirm it, such as timing between queries and the character set of the labels.
The model should flag the 40 queries to bad-dns.example with 32-character random-looking labels, and ask you to check whether the intervals are regular. That is a hypothesis. A lookup against your threat intelligence, the query timing from the same dns.tsv and the domain's registration data confirm or kill it. Remember that a second-level domain taken as the last two labels is wrong for names like example.co.uk, so use a public suffix list for real work.
Where the model goes wrong
A model reading tshark text works only with the text. Check these before anything goes in a report:
- Invented packet details. Ask what happened in packet 812 when you only pasted a summary and you may get a confident answer about flags, sequence numbers or payload bytes that were never in the input. If the number is not in what you pasted, it is a guess.
- Miscounted statistics. Language models are unreliable at counting and summing rows. Compute totals, rates and top talkers with
tshark -z,sort | uniq -cor Python, and give the model the result, as in step 4. - Encrypted traffic it cannot see. Most of a modern capture is TLS. The model can describe the handshake, the server name and the sizes and timing of the records, and it cannot tell you what was inside. Without keys, such as a
SSLKEYLOGFILEfrom your own client, any claim about the content is a guess. - Wrong filter syntax. Capture filters (BPF, used with
-f) and display filters (used with-Yor in the filter bar) are different languages, and models mix them. Field names also change between Wireshark versions. Test every filter, as in step 2. - Overconfident verdicts. "This is malware" or "this is normal" from a table of counts is an opinion. A backup job, a software updater and a beacon can all produce regular traffic to a single host. Corroborate with the process that made the connection, the host's logs and threat intelligence.
- Reading lines out of context. A single stream or a trimmed table hides what came before and after. Tell the model what you cut.
The rule is the same as in malware analysis with Odin: the model drafts, you verify, and only verified findings go in the report.
Other network work
The same approach of pasting text, asking for structure and then verifying covers the rest of the investigation:
- From capture to detection. Once you know what the traffic looks like, write the rule that finds the next copy. See Sigma and YARA rules with AI.
- The sample that made the traffic. For the malware on the host, see malware analysis with Odin, reverse engineering with AI and deobfuscate JavaScript with AI.
- Write-up. For the report that follows the investigation, see pentest report writing with AI.
- Practice. Many capture-the-flag challenges ship a
.pcap. See CTF practice with an AI coach. - Tooling. To turn this into a script that summarizes captures in bulk, see Claude Code for security tooling.
Common questions about AI for Wireshark
Can Odin open a pcap file?
No. Odin reads text only. Use tshark to print the summaries, stream text or fields you want to ask about, and paste that. Files that cannot be reduced to text, such as an encrypted payload, stay out of reach.
Can the model decrypt TLS traffic?
No. It reads the text you give it and cannot decrypt anything. If you control the client, a key log file lets Wireshark decrypt the session, and you can then follow the decrypted stream with tshark and paste the text.
Why do mainstream models refuse network analysis questions?
They react to how a prompt looks. Questions about beaconing, scans and exfiltration resemble attack planning even when you are the analyst who found them. Odin is built to answer legitimate security work directly.
Is it safe to paste a capture into a chat?
Only after you redact it. Remove credentials, cookies, personal data and real internal addresses, and follow the data rules in your engagement or employment terms. If you may not send the data to a third party at all, send the model only counts and shapes, such as protocol names, sizes and timing.
Which model should I use?
Use odin-v1 for reading unfamiliar traffic and writing filters, where its reasoning and 1,000,000-token context help. Use odin-flash, which is faster and cheaper, for quick questions such as "what does this TCP flag mean".
Get started
Create an API key in the console and follow the quickstart to make your first request, or paste a redacted tshark summary into the web chat to try it right away. Keep your work within the Acceptable Use Policy: analyze traffic to defend systems, and capture only what you are authorized to capture.
Comparing Odin with the assistant you use today? See uncensored AI for security research for a side-by-side comparison with mainstream assistants.