id: uptime-takeover

info:
  name: Uptime Takeover Detection
  author: philippedelteil
  severity: high
  reference:
    - https://github.com/EdOverflow/can-i-take-over-xyz/issues/368
  metadata:
    max-request: 1
  tags: takeover,uptime

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

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

      - type: word
        part: body
        words:
          - '<html><body>You are being <a href="https://uptime.betterstack.com">redirected</a>.</body></html>'

      - type: status
        status:
          - 302

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