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,discovery

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: 4b0a00483046022100b45a444160e7b90dfead5c8c91f1edeb89ba6b9d0628a832fb08ea7cfadb9083022100a06e9d4839c5f70370c93c2e12ed6a31fbbfc1c856187420939f59ddf56000c4:922c64590222798bb761d5b6d8e72950