tshark -r capture.pcap -Y "tcp.payload contains PK\x03\x04" -T fields -e data | xxd -r -p > output.zip This extracts the raw payload data and converts it back to a binary ZIP file. Want to quickly see if the ZIP contains something interesting (like malware or a sensitive config)?
But with a few clever tricks, you can extract, inspect, and even reconstruct ZIP files directly from a packet capture (pcap).
Use zipdetails or unzip -l on the saved file: