id: fortinet-fgfm-detect

info:
  name: Fortinet FGFM protocol - Detect
  author: johnk3r
  severity: info
  description: |
    FortiGate to FortiManager Protocol (FGFM) was detected.
  reference:
    - https://docs.fortinet.com/document/fortigate/6.4.0/hardening-your-fortigate/529217/fortios-ports-and-protocols
  metadata:
    verified: true
    max-request: 1
    shodan-query: 'port:541 xab'
  tags: network,tcp,fortinet,fortigate,fortimanager

tcp:
  - inputs:
      - data: 2E
        type: hex

    host:
      - "{{Hostname}}"
    port: 541

    read-size: 1024

    matchers:
      - type: word
        words:
          - ".fortinet.com"
          - "Certificate Authority"
        condition: and

    extractors:
      - type: regex
        regex:
          - '[a-z0-9.-]+\.fortinet\.com'
# digest: 4a0a00473045022100860d0195ebed435e8750cff74acf47494d9b1a9454d60a1541ca5cecd60551c7022009430476d349a5b5d69c05b6b2138b651081add725f54cecf271777693a9d92c:922c64590222798bb761d5b6d8e72950