id: ms-exchange-web-service

info:
  name: Microsoft Exchange Web Service - Detect
  author: bhutch
  severity: info
  description: |
    Microsoft Exchange Web Services was detected.
  reference:
    - https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/start-using-web-services-in-exchange
    - https://pentestlab.blog/tag/ews/
  classification:
    cpe: cpe:2.3:a:microsoft:exchange_server:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    product: exchange_server
    shodan-query: http.favicon.hash:1768726119
    vendor: microsoft
    verified: true
  tags: ms,microsoft,exchange,tech

http:
  - method: GET
    path:
      - "{{BaseURL}}/EWS/Exchange.asmx"

    matchers-condition: and
    matchers:
      - type: regex
        part: header
        regex:
          - "(?i)(X-Owa-Version:)"

      - type: status
        status:
          - 401

    extractors:
      - type: kval
        kval:
          - x_owa_version
# digest: 490a0046304402206f5d9c0e0b23e4a8ae9d2f4b99f3688c2daef6cb59037899bfea6455bbcf654f0220058960e38002865396412449c4bd3a73c107d3ffbb32c56088b70801e6cbef79:922c64590222798bb761d5b6d8e72950