id: wasabi-bucket-takeover

info:
  name: wasabi Bucket Takeover - Detection
  author: philippedelteil
  severity: high
  description: |
    wasabi Bucket takeover was detected.
  reference:
    - https://github.com/EdOverflow/can-i-take-over-xyz/issues/417
  metadata:
    verified: true
    max-request: 1
    shodan-query: "wasabis3"
  tags: takeover,wasabi,bucket

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

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - Host != ip
          - contains(tolower(header), "wasabis3")
        condition: and

      - type: word
        words:
          - "The specified bucket does not exist"
          - "BucketName"
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '<li>BucketName: (.*?)</li>'
          - '<BucketName>(.*?)</BucketName>'
# digest: 4b0a0048304602210097f1aca97057f003c59a5c10ab7af728c48e67931e61c626fd093c0843af74fc022100c6162c6fe4565098a0a2609a854fd7ef799f557193f7f3869bd83012a6f0f517:922c64590222798bb761d5b6d8e72950