id: ghost-takeover

info:
  name: ghost takeover detection
  author: pdteam
  severity: high
  description: ghost takeover was detected.
  reference:
    - https://github.com/EdOverflow/can-i-take-over-xyz/issues/89
  metadata:
    max-request: 1
  tags: takeover,ghost

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

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

      - type: word
        part: header
        words:
          - 'error.ghost.org'
          - 'offline.ghost.org'
        condition: or

      - type: status
        status:
          - 302

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