id: gitbook-takeover

info:
  name: gitbook takeover detection
  author: philippedelteil
  severity: high
  description: gitbook takeover was detected.
  reference:
    - https://github.com/EdOverflow/can-i-take-over-xyz/issues/259
    - https://hackerone.com/reports/223625
  metadata:
    max-request: 1
  tags: takeover,gitbook,hackerone,vuln

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

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

      - type: word
        words:
          - "If you need specifics, here's the error"
          - "Domain not found"
        condition: and

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