2021-03-18 11:23:29 +00:00
|
|
|
id: aws-bucket-takeover
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: AWS Bucket Takeover Detection
|
2023-08-20 19:22:48 +00:00
|
|
|
author: pdteam,pwnhxl
|
2021-03-18 11:23:29 +00:00
|
|
|
severity: high
|
2022-04-22 10:38:41 +00:00
|
|
|
reference:
|
2022-12-06 20:41:54 +00:00
|
|
|
- https://github.com/EdOverflow/can-i-take-over-xyz/issues/36
|
2022-01-04 19:34:16 +00:00
|
|
|
tags: takeover,aws,bucket
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 1
|
2021-03-18 11:23:29 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2021-03-18 11:23:29 +00:00
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}"
|
|
|
|
|
2021-05-07 08:43:35 +00:00
|
|
|
matchers-condition: and
|
2021-03-18 11:23:29 +00:00
|
|
|
matchers:
|
2022-11-17 15:43:27 +00:00
|
|
|
- type: dsl
|
|
|
|
dsl:
|
|
|
|
- Host != ip
|
|
|
|
|
2021-03-18 11:23:29 +00:00
|
|
|
- type: word
|
|
|
|
words:
|
2021-05-07 08:43:35 +00:00
|
|
|
- "The specified bucket does not exist"
|
|
|
|
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
2023-06-19 21:10:30 +00:00
|
|
|
- contains(tolower(header), 'x-guploader-uploadid')
|
2022-01-04 19:34:16 +00:00
|
|
|
negative: true
|
2023-02-01 19:56:56 +00:00
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: host
|
|
|
|
words:
|
|
|
|
- "amazonaws.com"
|
2023-08-25 21:48:28 +00:00
|
|
|
- "ks3.ksyun.com"
|
2023-08-20 19:22:48 +00:00
|
|
|
- "kss.ksyun.com"
|
2023-08-25 21:48:28 +00:00
|
|
|
- "kss3.ksyun.com"
|
2023-08-20 19:22:48 +00:00
|
|
|
- "ks3-cn-beijing.ksyun.com"
|
2023-08-25 21:48:28 +00:00
|
|
|
- "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"
|
2023-08-20 19:22:48 +00:00
|
|
|
- "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"
|
2023-03-07 16:02:07 +00:00
|
|
|
negative: true
|
2023-06-29 18:25:35 +00:00
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
part: body
|
|
|
|
group: 1
|
|
|
|
regex:
|
|
|
|
- '<li>BucketName: (.*?)</li>'
|
|
|
|
- '<BucketName>(.*?)</BucketName>'
|