id: starttls-mail-detect

info:
  name: STARTTLS Mail Server Detection
  author: r3dg33k,userdehghani
  severity: info
  description: |
    STARTTLS is an email protocol command that tells an email server that an email client, including an email client running in a web browser, wants to turn an existing insecure connection into a secure one.
  metadata:
    max-request: 1
  tags: mail,starttls,network,detect,smtp,detection,tcp,discovery

tcp:
  - inputs:
      - data: "65686c6f20636865636b746c730a"
        type: hex
    read-size: 2048

    host:
      - "{{Hostname}}"
    port: 25,2525,465,587

    matchers:
      - type: word
        words:
          - "250-STARTTLS"
# digest: 490a0046304402201205c03f298caf72605e0cc023a0902c3ac227cd053e886e2ccadd66afcc241b02206101d4f14945d80db0aa989f7267403599e41683e13fe586c96aceb20a962300:922c64590222798bb761d5b6d8e72950