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,discovery
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: 490a004630440220514152df3973d2f7ba5cd752bc2d28f00a71c3a8ae14731eacaba1beb385c2a702205922cd1b435d8b5cea06a7d295ffe8dfe6926089c46c406b703de9b3bd712152:922c64590222798bb761d5b6d8e72950