id: azure-takeover-detection

info:
  name: Microsoft Azure Takeover Detection
  author: pdteam,zy9ard3
  severity: high
  description: Microsoft Azure is vulnerable to subdomain takeover attacks. Subdomain takeovers are a common, high-severity threat for organizations that regularly create and delete many resources. A subdomain takeover can occur when a D>
  reference:
    - https://godiego.co/posts/STO/
    - https://docs.microsoft.com/en-us/azure/security/fundamentals/subdomain-takeover
    - https://cystack.net/research/subdomain-takeover-chapter-two-azure-services/
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cwe-id: CWE-404
  metadata:
    max-request: 1
  tags: dns,takeover,azure,discovery

dns:
  - name: "{{FQDN}}"
    type: A

    matchers-condition: and
    matchers:
      - type: word
        words:
          - NXDOMAIN
      - type: dsl
        dsl:
          - 'contains(cname, ".azure-api.net")'
          - 'contains(cname, ".azure-mobile.net")'
          - 'contains(cname, ".azurecontainer.io")'
          - 'contains(cname, ".azurecr.io")'
          - 'contains(cname, ".azuredatalakestore.net")'
          - 'contains(cname, ".azurefd.net")'
          - 'contains(cname, ".azurehdinsight.net")'
          - 'contains(cname, ".azurewebsites.windows.net")'
          - 'contains(cname, ".blob.core.windows.net")'
          - 'contains(cname, ".database.windows.net")'
          - 'contains(cname, ".redis.cache.windows.net")'
          - 'contains(cname, ".search.windows.net")'
          - 'contains(cname, ".servicebus.windows.net")'
          - 'contains(cname, ".visualstudio.com")'
          - 'contains(cname, ".web.core.windows.net")'

    extractors:
      - type: dsl
        dsl:
          - cname
# digest: 4b0a00483046022100ea21a22d694a45d9a60b0516c99fff75fe6d21ef1c4ed0d47fbf1db3d3dd69cc022100ecd0145636ed5359db7041e191d866f9bf7dd5817b678c22b49be84463e6a814:922c64590222798bb761d5b6d8e72950