id: uptimerobot-takeover

info:
  name: uptimerobot takeover detection
  author: pdteam
  severity: low
  description: uptimerobot takeover was detected.
  reference:
    - https://exploit.linuxsec.org/uptimerobot-com-custom-domain-subdomain-takeover/
    - https://github.com/EdOverflow/can-i-take-over-xyz/issues/45
  metadata:
    max-request: 1
  tags: takeover

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

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

      - type: regex
        regex:
          - "^page not found$"

      - type: word
        part: header
        words:
          - "Server: Caddy"
        case-insensitive: true

      - type: status
        status:
          - 404

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