Created on 12-09-2024 02:54 AM Edited on 12-11-2024 03:53 AM By Anthony_E
Description | This article describes how to collect Indicators of Compromise (IoC) debugs on a FortiGate (VDOM and non-VDOM) using automatic scripts. |
Scope | FortiGate (VM/physical) v7.0.x v7.2.x v7.4.x v7.6.x. |
Solution |
IoC information is expected for a complete evaluation.
Before collecting the Automated Debugs: Enable SSH on the FortiGate and each unit shall be accessed separately and verify the running Port.
Method A: Interactive Prompt.
PS C:\Users\user\Desktop\FGT IoC Scripts> .\FGT-SysIntegrity_Debug.ps1
PS C:\Users\user\Desktop\FGT IoC Scripts> .\FGT-Hash_Debug.ps1
Method B: Predefined Parameters.
Collect Primary unit (no VDOM no HA) executed from primary: PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SysIntegrity_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "0" -ha "0"
Collect Secondary unit (no VDOM with HA) executed from primary:
PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SysIntegrity_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "0" -ha "1"
Collect Primary unit (VDOM no HA) executed from primary:
PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SysIntegrity_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "1" -ha "0"
Collect Secondary unit (VDOM with HA) executed from primary:
PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SysIntegrity_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "1" -ha "1"
2. Collecting: FortiGate SHA1 HASH Integrity debug output. Collect Primary unit (no VDOM no HA) executed from primary:
PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SHA1-HASH_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "0" -ha "0"
Collect Secondary unit (no VDOM with HA) executed from the primary:
PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SHA1-HASH_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "0" -ha "1"
Collect Primary unit (VDOM no HA) executed from the primary: PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SHA1-HASH_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "1" -ha "0"
Collect Secondary unit (VDOM with HA) executed from the primary:
PS C:\Users\rcaushi\Desktop\FGT IoC Scripts> .\FGT-SHA1-HASH_Debugv2.0.ps1 -ip "10.191.19.172" -port 22 -username "admin" -password "fortinet" -vdom "1" -ha "1"
Additional Notes:
Disclaimer: This script may be used without an Internet connection. The script does not gather any sensitive information except the FortiGate debug output. The debug output and the script code content can be verified with any text editor. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.