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

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: 4a0a004730450221009976de50b01e4d375de3c18adc1ce6641a39ca2c17a8147876e633367ee9af1202206eae54b0f19343ea0811a1ee5e77ea5f96e5877008c942dfa14a70a522c897e7:922c64590222798bb761d5b6d8e72950