前置信息:
阿里云对象存储OSS - https://help.aliyun.com/document_detail/31817.html、https://help.aliyun.com/document_detail/171608.html
腾讯云对象存储COS-https://cloud.tencent.com/product/cos、 https://cloud.tencent.com/document/product/436/13312
七牛云对象存储Kodo-https://www.qiniu.com/products/kodo、https://developer.qiniu.com/kodo/1644/security
华为云对象存储OBS-https://support.huaweicloud.com/productdesc-obs/zh-cn_topic_0045829060.html、https://support.huaweicloud.com/productdesc-obs/obs_03_0374.html
亚马逊云对象存储 Simple Storage Service (Amazon S3)https://aws.amazon.com/cn/what-is-cloud-object-storage/、https://aws.amazon.com/cn/s3/faqs/#security
漏洞列表:
|常见漏洞|利用条件|利用方法|漏洞原理|漏洞排查|修复建议|
|-------|-------|-------|-------|-------|-------|
|未授权访问、公有存储|存储配置允许匿名用户读写存储数据|1、获取公有存储的BucketName 2、尝试遍历存储内容 /?max-keys=$&maker=$|允许匿名用户在根目录下列举桶内对象|||
|Bucket Object 遍历|策略中允许了Object的List操作||||
|越权、Bucket ACL 可读/写|存储配置了错误的ACL|1、查看ACL策略,获取用户ID和权限配置/?acl 2、使用PUT请求修改ACL策略 3、遍历存储桶||||
|不安全的访问控制|存储配置允许任何经过身份验证的用户进行读写|1、通过身份验证 2、获取敏感文件 3、任意文件上传-上传恶意文件 4、删除文件||||
|Bucket劫持|1、存在无人认领的Bucke 2、信息泄露-泄露HostID、BucketName|1、FOFA搜索 body="NoSuchBucket" &&body="BucketName" &&body="http://aliyuncs.com"或body="NoSuchBucket" &&body="BucketName"(以阿里云为例)2、打开OSS浏览器,新建Bucket,输入对应的HostID、BucketName并上传文件 3、Bucket接管||||
|信息泄露-签名|1、github、配置文件等泄漏了用户身份凭证、签名 2、小程序、app反编译源码中泄露凭证 3、客户端硬编码存在凭证泄漏|github搜SecretId/SecretKey/AccessKeyId、SecretAccessKey|||敏感凭证不上传github。获取签名字符串从服务端获取,不存储在客户端或源码|
参考信息:
亚马逊S3 Bucket
AWS Penetration Testing for S3 Bucket Service Basics Security https://blog.securelayer7.net/aws-penetration-testing-for-s3-bucket-service-basics-security/
Hands-on AWS S3 Bucket Vulnerabilities https://blog.securelayer7.net/hands-on-aws-s3-bucket-vulnerabilities/
Hands-on AWS S3 Bucket Takeover https://blog.securelayer7.net/hands-on-aws-s3-bucket-account-takeover-vulnerability/
https://zone.huoxian.cn/d/907-aws-s3
阿里云 OSS对象存储攻防-https://zone.huoxian.cn/d/918-oss/4
腾讯云COS对象存储攻防-https://zone.huoxian.cn/d/949-cos
华为云OBS对象存储攻防-https://zone.huoxian.cn/d/962-obs
谷歌云对象存储攻防-https://zone.huoxian.cn/d/931
微软云对象存储攻防-https://zone.huoxian.cn/d/940
对象存储桶配置不当可查看桶列表漏洞解析 - https://zone.huoxian.cn/d/784/3
评论区