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

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

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

    matchers:
      - type: word
        words:
          - "250-STARTTLS"
# digest: 4a0a00473045022100c401a8ec59ac73158cba6e06dd58843d53796dbf867c728609f2686decbd8d5402202db66f68732ec1f1d8da0ed63b6c951971fb0f3d2762542452f58e15c5a91eb9:922c64590222798bb761d5b6d8e72950