id: mta-sts-exposure

info:
  name: Well-Known MTA-STS Policy
  author: rxerium
  severity: info
  description: |
    Detects SMTP MTA-STS policy file (RFC 8461).
  impact: |
    Presence of this well-known resource can expose implementation details or policies.
  reference:
    - https://www.rfc-editor.org/rfc/rfc8461
  metadata:
    verified: true
    max-request: 1
    google-query: inurl:"/.well-known/mta-sts.txt"
  tags: well-known,email,security,rfc8461,miscellaneous,misc,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.well-known/mta-sts.txt"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "version: STS"
          - "mode:"
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a0047304502205ec00f1779045e76409affe8ee298eb6fb5c00b8758ef99e8ef2699ec036332b022100f64a91396c4d20d3febf540e9bb7ec530ff71e1c64f23c2e15ba6dd64d44af11:922c64590222798bb761d5b6d8e72950