id: ftp-detect

info:
  name: FTP Service - Detect
  author: Mys7ic
  severity: info
  description: |
    FTP service was detected.
  reference:
    - https://www.rfc-editor.org/rfc/rfc959
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 1
  tags: network,ftp,detect,detection,tcp,discovery

tcp:
  - inputs:
      - data: "\r\n"

    host:
      - "{{Hostname}}"

    port: 21
    read-size: 2048

    matchers-condition: or
    matchers:
      - type: regex
        regex:
          - "(?i)^220.*Ftp.*"

      - type: word
        case-insensitive: true
        words:
          - "Ftp"
# digest: 4a0a004730450220777863f3f882867505942bbd5dd0523bc76d19e9925979467c61ad0ceb350ca7022100dfbf08a75d5266e1b5c272fcdadfeffad5d03062ceadbbc1af5fafe3867321f0:922c64590222798bb761d5b6d8e72950