id: exim-detect

info:
  name: Exim - Detect
  author: ricardomaia,userdehghani
  severity: info
  description: |
    Exim can accept messages from remote hosts using SMTP over TCP/IP, and as well as from local processes. It handles local deliveries to mailbox files or to pipes attached to commands, as well as remote SMTP deliveries to other hosts.
  reference:
    - https://www.exim.org/docs.html
  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
    shodan-query: "product:\"Exim smtpd\""
  tags: network,detect,smtp,mail,exim,detection,tcp
tcp:
  - inputs:
      - data: "\n"

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

    matchers:
      - type: word
        words:
          - "ESMTP Exim"

    extractors:
      - type: regex
        group: 1
        name: version
        regex:
          - '(?i)SMTP.Exim\s?([\w.]+)'
# digest: 4b0a00483046022100f342ffe528f0db8a0dbcb621ef1130abc6c69ecdfb7eb61ddb9caa565e70537d022100b061d2f6fe16cd1e33d1947e5e32e483c6b2d6c5a6229e0bdffd3eb5756ac6e5:922c64590222798bb761d5b6d8e72950