id: aws-bucket-takeover info: name: AWS Bucket Takeover Detection author: pdteam,pwnhxl,zy9ard3 severity: high reference: - https://github.com/EdOverflow/can-i-take-over-xyz/issues/36 metadata: max-request: 1 tags: takeover,aws,bucket http: - method: GET path: - "{{BaseURL}}" matchers-condition: and matchers: - type: dsl dsl: - Host != ip - type: word words: - "The specified bucket does not exist" - "BucketName" condition: and - type: dsl dsl: - contains(tolower(header), 'x-guploader-uploadid') negative: true - type: word part: host words: - "amazonaws.com" - "ks3.ksyun.com" - "kss.ksyun.com" - "kss3.ksyun.com" - "ks3-cn-beijing.ksyun.com" - "ks3-cn-guangzhou.ksyun.com" - "ks3-cn-hk-1.ksyun.com" - "ks3-cn-shanghai.ksyun.com" - "ks3-jr-beijing.ksyun.com" - "ks3-jr-shanghai.ksyun.com" - "ks3-rus.ksyun.com" - "ks3-sgp.ksyun.com" - "obs.jrzq.huaweicloud.com" - "obs.petalpay.huaweicloud.com" - "oss-cn-hangzhou.aliyuncs.com" - "oss-cn-shanghai.aliyuncs.com" - "oss-cn-qingdao.aliyuncs.com" - "oss-cn-beijing.aliyuncs.com" - "oss-cn-zhangjiakou.aliyuncs.com" - "oss-cn-huhehaote.aliyuncs.com" - "oss-cn-shenzhen.aliyuncs.com" - "oss-cn-hongkong.aliyuncs.com" - "oss-us-west-1.aliyuncs.com" - "oss-us-east-1.aliyuncs.com" - "oss-ap-southeast-1.aliyuncs.com" - "oss-ap-southeast-2.aliyuncs.com" - "oss-ap-southeast-3.aliyuncs.com" - "oss-ap-southeast-5.aliyuncs.com" - "oss-ap-south-1.aliyuncs.com" - "oss-ap-northeast-1.aliyuncs.com" - "oss-eu-central-1.aliyuncs.com" - "oss-me-east-1.aliyuncs.com" negative: true extractors: - type: regex part: body group: 1 regex: - '
  • BucketName: (.*?)
  • ' - '(.*?)' # digest: 490a004630440220552d119ed4defe335fcb706a07cd57859f985baf36b33e4ae1427569f10fbf6a022049b852ee41be1c370327d28658a18e80d90306749e35f501d4ebe44440805b4e:922c64590222798bb761d5b6d8e72950