id: netlify-takeover

info:
  name: netlify takeover detection
  author: 0xPrial,pdteam
  severity: high
  description: netlify takeover was detected.
  reference:
    - https://github.com/EdOverflow/can-i-take-over-xyz/issues/40
    - https://monish-basaniwal.medium.com/how-i-found-my-first-subdomain-takeover-vulnerability-b7d5c17b61fd
    - https://github.com/EdOverflow/can-i-take-over-xyz/pull/289
  metadata:
    max-request: 1
  tags: takeover,netlify

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - Host != ip

      - type: word
        part: body
        words:
          - "Not Found - Request ID:"
        case-insensitive: true

      - type: word
        part: header
        words:
          - "Netlify"

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