2021-03-18 11:23:29 +00:00
|
|
|
id: aws-bucket-takeover
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: AWS Bucket Takeover Detection
|
2023-10-10 12:03:23 +00:00
|
|
|
author: pdteam,pwnhxl,zy9ard3
|
2021-03-18 11:23:29 +00:00
|
|
|
severity: high
|
2023-12-22 08:59:06 +00:00
|
|
|
description: AWS Bucket takeover was detected.
|
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
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 1
|
2023-10-14 11:27:55 +00:00
|
|
|
tags: takeover,aws,bucket
|
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"
|
2023-10-10 12:03:23 +00:00
|
|
|
- "BucketName"
|
|
|
|
condition: and
|
2021-05-07 08:43:35 +00:00
|
|
|
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
2023-06-19 21:10:30 +00:00
|
|
|
- contains(tolower(header), 'x-guploader-uploadid')
|
2024-05-03 11:01:46 +00:00
|
|
|
- contains(tolower(header), "aliyunoss")
|
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>'
|
2024-05-03 11:03:57 +00:00
|
|
|
# digest: 4a0a00473045022100a1bf43094a8a2ebf252d9ff331d334da4732cc4973121200c8d1a1faad8c0d0002201952b9324faa832fbed0e7662d820c1e56ea3f0820a3a67bc11da01926bba9b0:922c64590222798bb761d5b6d8e72950
|