82 lines
2.4 KiB
YAML
82 lines
2.4 KiB
YAML
id: aws-bucket-takeover
|
|
|
|
info:
|
|
name: AWS Bucket Takeover Detection
|
|
author: pdteam,pwnhxl,zy9ard3
|
|
severity: high
|
|
description: AWS Bucket takeover was detected.
|
|
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')
|
|
- contains(tolower(header), "aliyunoss")
|
|
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:
|
|
- '<li>BucketName: (.*?)</li>'
|
|
- '<BucketName>(.*?)</BucketName>'
|
|
# digest: 4a0a0047304502202a3d2908d2cb665d3af1b837197220ccae74b048608ec804640728c6044ba440022100e1bb94eba6194405a83a0d0ea50ce3aa58821b22e49db2e60e0d981eb64c4d18:922c64590222798bb761d5b6d8e72950 |