Packet Capture
Cheat sheet · https://pcornel.dk/topic.php?topic=3097
Answer
Windows can capture packets without extra software using pktmon (Windows 10 1809 and later, Server 2019 and later). The capture is saved as an ETL file and converted to pcapng for Wireshark.
Remember
Add filters before starting, or the file grows fast; filters stay until removed (pktmon filter remove). Use --pkt-size 0 to keep whole packets. Convert with pktmon etl2pcap before opening in Wireshark.
First checks
pktmon filter add -i <ip> -p <port>— capture only that address and port.pktmon filter list— filters in force.pktmon start --capture --pkt-size 0— start, full packets.pktmon stop— stop; writes PktMon.etl.pktmon etl2pcap PktMon.etl -o capture.pcapng— convert for Wireshark.pktmon filter remove— clear the filters afterwards.
Verify in this order
old filters cleared → filter for the flow added → capture started with full packets → problem reproduced → stopped → converted to pcapng → conversation readable in Wireshark
Where it usually breaks
First mismatch in host/interface identity → local config/routing/name state → Windows service/provider → firewall/security/session → remote service → application-visible exchange; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3097