Analyze network problems with Wireshark without installing software on production systems
Often, problems with the public key infrastructure can be found in the underlying network - for example, if a firewall rule is missing from the network.
Thus, it is helpful if one is able to record network traffic in order to analyze it. Excellent tools exist for this purpose, such as Wireshark , but these require that an installation be made on the system in question, which cannot and should not be done easily on a production system.
Fortunately, the Windows Server operating system has a built-in mechanism to capture network packets. However, the resulting files are not compatible with Wireshark. Microsoft's own tool, Message Analyzer, was discontinued on Nov 25, 2019 and the download links removed .
The following therefore describes how such a recording can be generated and subsequently converted into a Wireshark-compatible format in order to be able to analyze the recording away from the server in question.
On the PKI system in question, a packet capture is started as an administrator with the following command line command:
netsh trace start persistent=no report=no capture=yes [maxSize=1024] [ipv4.address={IP-Adresse-Quelle-oder-Ziel}] tracefile={Pfad-zur-Aufgabedatei}.etl
If the "tracefile" parameter is not specified, a file is automatically created in the user's temp directory.
After a short waiting period one can start reproducing the error. Once this has been completed successfully, the recording can be stopped with the following command line command:
netsh trace stop
The created file can now be converted to a Wireshark-compatible format, either on the same system or on another one, with the free Microsoft program etl2pcapng .
etl2pcapng {ETL-Datei}.etl {PCAPNG-Datei}.pcapng
The .pcapng file generated in this step can now be opened and analyzed with Wireshark.
Filtering the recorded data
Do you know TameMyCerts? TameMyCerts is an add-on for the Microsoft certification authority (Active Directory Certificate Services). It extends the function of the certification authority and enables the application of rule sets to realize the secure automation of certificate issuance. TameMyCerts is unique in the Microsoft ecosystem, has already proven itself in countless companies around the world and is available under a free license. It can be downloaded via GitHub and used free of charge. Professional maintenance is also offered.
In case a network firewall silently drops the outgoing data packets, an appropriate filter could look like the following, for example:
| Action | Syntax |
|---|---|
| Show traffic from a specific source system only | ip.src == {IP address of the source system} |
| Show traffic to a specific target system only | ip.dst == {IP address of the target system} |
| Show only initiated TCP connections | tcp.flags.syn == 1 |
Example:
tcp.flags.syn == 1 && ip.dst == {IP-Adresse-des-Zielsystems} && ip.src == {IP-Adresse-des-Quellsystems}If the filter is now applied to the .pcapng file, the previously described case of a network firewall silently dropping outgoing packets would show up as follows, for example (packets with the SYN flag set repeatedly appear, Wireshark suspects retransmission):

External sources
- microsoft/etl2pcapng (GitHub)
- Using Netsh to manage traces - Win32 apps | Microsoft Learn (Microsoft)
- No Wireshark? No TCPDump? No Problem! (SANS ISC InfoSec Forums)
- So you want to use Wireshark to read the netsh trace output .etl? (Microsoft TechNet Blogs, archive link)
- Microsoft Message Analyzer Blog (Microsoft)
