r/wireshark

WireShark with SharkTap only seeing one side of network traffic

I am working in a manufacturing plant and this weekend while they were not in production, I installed a SharkTap between the PLC and a managed switch. I tested the WireShark and was able to see communication to and from the PLC.

Now that they are in production, every capture I take is only seeing the communication From the PLC. I know that the PLC is receiving packet because stuff is working.

I have tried 2 different computers to run the WireShark. Both computer with Windows 11. The SharkTap is connected to a Gigabit Wired Tap Port. I have also replaced the Tap Port Network Cable.

Does anyone have any suggestions or thoughts?

reddit.com
u/SirPalinDrome_Real — 3 days ago

Reverse Engineering When Both Software + Hardware are a Black Box

Hello,

I'm trying to use wireshark to learn more about the communication between some of my company's proprietary software and some of their hardware. (Because it's my company's stuff, I'd rather not share the raw capture.) I thought this might be faster than finding out through my own company because I've previously found that they don't like to share source code or design details across departments. I've exported a wireshark capture to csv because I'm new to using wireshark and it was easier for me to browse that way. I used this command:

tshark.exe -r "input.pcapng" -T fields -e frame.number -e frame.time_relative -e ip.src -e ip.dst -e frame.len -e data.data -e tcp.payload -e udp.payload -E header=y -E separator=, > "output.csv"

The problem is, for most of the data frames, the "length" of the frame is not matching the raw data that I'm seeing. For example, there are many rows where "tcp.payload" is completely blank, but "frame.len" isn't 0, so that tells me there's something missing. I want to make sure I'm really capturing all communciation between the hardware unit and the laptop running the software. How can I make sure I'm really seeing everything? (After error correction has been performed.)

I'm really just looking to see that the frame length matches the raw data I have.

Also, if it's not obvious already, I'm very new to using this program, so if anyone else has experience with what I described in the title, (reverse engineering with little outside info), I'd very much like to hear about it.

Thanks!

reddit.com
u/-Louwess- — 6 days ago
▲ 28 r/wireshark+1 crossposts

Streaming tshark output into Go: how I cut a 2.5 GB PCAP job from 6-7 hours to 70 minutes

I had a Go CLI that wrapped tshark for PCAP analysis. Worked fine until I hit a 2.5 GB file — 1.9 million packets, 6-7 hours, then OOM crashes.

Two problems, found in sequence.

First, I was running three separate tshark queries against the same file (analytics, rows, full dissection). Three full passes over 2.5 GB. Consolidating them into one query took it to 1-2 hours.

The OOM was still there though, because I was asking for full JSON dissection — tshark building the whole output in memory, then my program parsing all of it in memory. So I piped tshark's stdout directly into my program's stdin and switched to -T fields/-T ek with only the fields I needed. Memory went flat, processing dropped to ~70 minutes.

Still single-threaded, which is the next problem. Curious whether anyone's found a good approach for parallelising tshark work beyond splitting the input file.

Full writeup: https://robinhayer.dev/the-2-5-gb-wall

robinhayer.dev
u/Hot_Interest_4915 — 10 days ago