id: bitbucket-takeover

info:
  name: Bitbucket Takeover Detection
  author: pdteam
  severity: high
  description: Bitbucket takeover was detected.
  reference:
    - https://github.com/EdOverflow/can-i-take-over-xyz
  metadata:
    max-request: 1
  tags: takeover,vuln

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

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

      - type: word
        words:
          - "Repository not found"
        part: body

      - type: word
        words:
          - "text/plain"
        part: header

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