id: azure-domain-tenant

info:
  name: Microsoft Azure Domain Tenant ID - Detect
  author: V0idC0de
  severity: info
  description: Microsoft Azure Domain Tenant ID was detected.
  reference:
    - https://azure.microsoft.com
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: azure,microsoft,cloud,exposure

http:
  - raw:
      - |
        @Host: https://login.microsoftonline.com:443
        GET /{{Host}}/v2.0/.well-known/openid-configuration HTTP/1.1
        Host: login.microsoftonline.com

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        words:
          - "token_endpoint"

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - "\"https:\\/\\/login\\.microsoftonline\\.com\\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})"
# digest: 490a004630440220380b91e3d3ce76c07ce2b904cc18ecc40888e6a28d7d3cfd76c546fa9fab886502204f853718a43fe9df17cd54fa43404d659359571b6ffbc690b5f27bbdde76990a:922c64590222798bb761d5b6d8e72950