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,vuln

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: 490a004630440220772d7db9d7eabfc470d8fcf910bf7e2b5a63b21483ab56dd1254dfcdd8e1b206022035a36011c42b3d39357246677a372c8acc949b8b74aaf03030a628beddefeb07:922c64590222798bb761d5b6d8e72950