id: expn-mail-detect

info:
  name: EXPN Mail Server Detect
  author: r3dg33k,userdehghani
  severity: info
  description: |
    The "EXPN" can be used by attackers to learn about valid usernames on the target system. On some SMTP servers, EXPN can be used to show the subscribers of a mailing list subscription lists are generally considered to be sensitive information.
  metadata:
    max-request: 1
  tags: mail,expn,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-EXPN"
# digest: 4a0a004730450220650a3d7c15df44f9c1fd15d9fc8ad1f88145c193a83cfd01c718d46acb908aec022100e02c10e249386242142ad36c10a34dc141db75d9929001cbf58b14bf6c942f0a:922c64590222798bb761d5b6d8e72950