id: cargocollective-takeover

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

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

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

      - type: word
        words:
          - '<div class="notfound">'
          - '404 Not Found<br>'
        condition: and

    extractors:
      - type: dsl
        dsl:
          - cname
# digest: 490a0046304402207f8cab5b4a1c357f9580b238f840eb2a426a8286d6566a45fbb0c9dd839bf1d4022007917b3b0f30ee6a31fc6eac50e9e81b6abbd199f8c05e11fd2c32e846901ddb:922c64590222798bb761d5b6d8e72950