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

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

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

    matchers:
      - type: word
        words:
          - "250-EXPN"
# digest: 4b0a00483046022100f8e5cd3a121bcabec20a27e0138f1889cf6a3414b88ff22804573c7541b7efea022100b31924d7889f073f554fccdb8fbac0857bcdbc356aa2035893f5459f3d66ff42:922c64590222798bb761d5b6d8e72950