By Manny Fernandez

May 7, 2024

Converting FortiGate CLI packet debug to PCAP file on macOS

Converting FortiGate CLI packet debug to PCAP file on macOS

Years ago, when I started using FortiGates, I had a Windows VM where I could run some utilities and so forth.  However I have since gone full macOS for the past 12 years.  There is a great article on the Fortinet site explaining how to perform a packet capture on FortiOS using a verbosity level of 3 or 6.  This gives you the opportunity to copy the output into a file, run a perl script against it and generate a .pcap file for further analsys.

Built-In Packet Sniffer

Here is a link to the original document.  If you download the file at the bottom of the page fgt2eth.pl.zip

2024 05 07_01 34 35.

On macOS, you will need to have home brew installed.  Once you install Home Brew, run the following command to get the cli version of wireshark

2024 05 07_01 26 28.

Once this has completed, you can chmod +x the fgt2eth.pl file.  I recommend moving the fgt2eth.pl to a folder in your path statement set .  On my system, I chose /opt/home brew

Remember to use the -in for the source of the file and -out for the path where you want the file to be stored.  If you leave out the -out, it will use the current directory (You can use pwd to display the current directory if not part of the prompt).

fgt2eth.pl -in ~/Desktop/diadebug.txt -out /Users/fernandezm/Desktop/remot
e.pcap

In my example, I used the above command.

Hope this helps.

The Dark Web: The Good, the Bad and the Ugly (Myths vs. Reality)

The Dark Web: The Good, the Bad and the Ugly (Myths vs. Reality)

Dark web myths debunked: what is real, what is hype, what to avoid, how to stay legal, and how to block Tor on a...

Read More
FSSO Mobility Agent on VDI: Identify Chromebook Users Behind Parallels RAS with FortiAuthenticator

FSSO Mobility Agent on VDI: Identify Chromebook Users Behind Parallels RAS with FortiAuthenticator

Run the FSSO Mobility Agent in a VDI golden image so FortiGate identifies Chromebook users on Parallels RAS, and know when the TS Agent...

Read More
Apache Roller CVE-2026-129448: Patch, Mitigate and Virtual Patch the XML-RPC RCE

Apache Roller CVE-2026-129448: Patch, Mitigate and Virtual Patch the XML-RPC RCE

Apache Roller CVE-2026-129448 is an exploited 9.8 pre-auth RCE. Apply the web.xml fix, virtual patch it on FortiGate, and hunt for compromise.

Read More