id: ms-exchange-web-service

info:
  name: Microsoft Exchange Web Service - Detect
  author: bhutch,userdehghani
  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:
    verified: true
    max-request: 2
    vendor: microsoft
    product: "exchange_server"
    shodan-query:
      - "http.favicon.hash:1768726119"
      - http.title:"outlook"
      - cpe:"cpe:2.3:a:microsoft:exchange_server"
    fofa-query:
      - icon_hash=1768726119
      - title="outlook"
    google-query: intitle:"outlook"
  tags: ms,microsoft,exchange,tech,panel,discovery

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

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: regex
        part: header
        regex:
          - "(?i)(X-Owa-Version:)"

      - type: status
        status:
          - 401
          - 302

    extractors:
      - type: kval
        kval:
          - x_owa_version
# digest: 4a0a00473045022042f863531afb3a62357883ee20f5a49a1272002fb6ee423b67bad3ddee98b566022100dd9440747041924c2183e9a27021f3d478fc4fd77015b880911bd386f7311ed3:922c64590222798bb761d5b6d8e72950