id: office365-open-redirect

info:
  name: Office365 Autodiscover - Open Redirect
  author: dhiyaneshDk
  severity: medium
  description: Office365 Autodiscover contains an open redirect vulnerability. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
  remediation: See the workaround detailed in the Medium post in the references.
  reference:
    - https://medium.com/@heinjame/office365-open-redirect-from-autodiscover-64284d26c168
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cwe-id: CWE-601
  metadata:
    max-request: 1
  tags: redirect,office365,microsoft,misconfig,intrusive

http:
  - method: GET
    path:
      - "{{BaseURL}}/autodiscover/autodiscover.json/v1.0/{{randstr}}@interact.sh?Protocol=Autodiscoverv1"

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - "autodiscover.interact.sh"

      - type: status
        status:
          - 302
# digest: 4a0a0047304502204ca49f692da622da6814c7db06a7eada8a2dc5c5a905ab2917e759f3cd20e9bf022100e9b6d72a3670b92a9928e130f3a825c45236e645b12fbfd5b3edb31f1f5ef512:922c64590222798bb761d5b6d8e72950