Description | This article describes how to collect FortiGate files hash, to check whether FortiGate was compromised. |
Scope | FortiOS 7.0.13 7.2.6 7.4.0 and above. |
Solution |
Use this command to get the FortiGate file hash, period run it, and compare hash differences to determine if FortiGate was compromised.
Command:
diagnose sys filesystem hash
Command usage:
SYNOPSIS:
DESCRIPTION: Compute the sha256 hash for each file in the directory specified by each PATH.
OPTIONS:
Command example:
diagnose sys filesystem hash
Check default directories files hash including /bin /data /lib /migadmin /sbin /usr/local.
diagnose sys filesystem hash /bin
Only check /bin directory file. Include subdirectory.
diagnose sys filesystem hash migadmin -d 1
Only check migadmin directory, not include subdirectory.
Sample output:
diagnose sys filesystem hash migadmin -d 1
diagnose sys filesystem hash migadmin Filesystem hash complete. Hashed 1130 files.
Important:
Collect this output from the Console or SSH terminal applications. Avoid collecting it from the GUI's CLI web console. |
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 2024 Fortinet, Inc. All Rights Reserved.