id: auto-usb-install

info:
  name: Fortinet Auto USB Installation Enabled - Detect
  author: pussycat0x
  severity: info
  description: Via Fortinet Auto USB installation, an attacker with physical access to a FortiGate can load a new configuration or firmware using the USB port, thereby potentially being able to obtain sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://docs.fortinet.com/document/fortigate/6.2.0/hardening-your-fortigate/582009/system-administrator-best-practices
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  tags: audit,config,file,firewall,fortigate

file:
  - extensions:
      - conf

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "set auto-install-config disable"
          - "set auto-install-image disable"
        negative: true

      - type: word
        words:
          - "config system"
          - "config router"
          - "config firewall"
        condition: or
# digest: 4b0a00483046022100a69e2680bdc8737910b287769f6340e8f3e1b40d1c73613afb89412d9452827402210082303f090f62f66011c53285b047ad39d384d13fea7601a4edbfa35c6e737833:922c64590222798bb761d5b6d8e72950