Skip to content

FBI advisory on FortiGate (FortiBleed): what to check in your config

Firewall audit · FortiGate · how-to

How to audit a FortiGate firewall config: ten things to check

The ten most severe checks the review runs on a FortiGate export, each with the setting or line it reads. The lines come from a made-up insecure sample file, so you can find the same setting in your own export.

Ten things to check

  1. Every admin account must set a password

    CriticalAuth

    An admin entry without a password lets anyone log in as that user.

    edit "ops-helper" line 15 of failing.conf

  2. SSHv1 must not be permitted

    CriticalCrypto

    SSHv1 has known cryptographic weaknesses and should not run anywhere.

    config system global line 2 of failing.conf

  3. WAN interfaces should not allow HTTPS management

    CriticalInterfaces

    Allowing HTTPS admin on a WAN interface exposes the admin UI to the internet.

    set allowaccess ping https ssh snmp line 23 of failing.conf

  4. WAN interfaces should not allow SSH

    CriticalInterfaces

    SSH on a WAN interface is a brute-force target.

    set allowaccess ping https ssh snmp line 23 of failing.conf

  5. No firewall policy should allow any-any-any with action accept

    CriticalPolicies

    A policy that accepts any source / any destination / any service is a default-allow rule.

    edit 2 line 72 of fortinet-fortigate-insecure.conf (the sample file)

  6. Admin accounts must enforce two-factor authentication

    CriticalAuth

    Admin accounts without MFA are an exploitable single factor.

    The setting it reads: system admin

  7. Admin accounts should restrict source IPs (trusthost)

    HighAuth

    Admin accounts without a `trusthost` ACL accept logins from any source.

    edit "admin" line 11 of failing.conf

  8. IPsec phase-1 should not use weak DH groups (1, 2, 5)

    HighCrypto

    DH groups 1, 2, and 5 are no longer considered secure.

    edit "site-a-ipsec" line 67 of failing.conf

  9. IPsec phase-1 should negotiate over IKEv2, not IKEv1

    HighCrypto

    IKEv1 is deprecated (RFC 9395) and lacks the anti-DoS cookies and stronger negotiation of IKEv2.

    edit "site-a-ipsec" line 67 of failing.conf

  10. `strong-crypto` should be enabled

    HighCrypto

    `strong-crypto disable` allows weak SSH/SSL/IPsec algorithms (3DES, MD5, SHA1).

    set strong-crypto disable line 7 of failing.conf

How to export the file

How long it takes: About 5 minutes per FortiGate; a large configuration takes a minute or two more to print.

  1. GUI (FortiOS 7.x): click your user name (in the upper right-hand corner) → Configuration → Backup → Backup to: Local PC → File format: FortiOS (not YAML) → leave Encryption and Password mask off → OK, and upload the .conf (on FortiOS 8.0.1 and later this screen has no unprotected choice: use the command-line steps there)

Every step, the command-line route, and the errors you may meet: the Fortinet FortiGate export guide.

What the export does not show

  • Multi-VDOM files: settings inside config global and config vdom blocks are not read yet
  • Rule comments, so rule documentation is not checked
  • Hit counts, so unused rules are not found
  • Logs, sessions and traffic: this is the configuration and nothing else

Live sessions, logs and running hosts are not in a configuration export, so no finding comes from them.

The rest of the review

The review runs 55 checks on a FortiGate export. All of them, with the part of the export each reads: FortiGate firewall audit from the config file. The same items across every firewall: the firewall audit checklist.