id: exim-detect

info:
  name: Exim - Detect
  author: ricardomaia
  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:
    max-request: 1
    shodan-query: product:"Exim smtpd"
    verified: true
  tags: network,detect,smtp,mail,exim

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

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

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

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