一个枚举 Google 存储桶、确定您对它们的访问权限以及判断是否可以权限提升的脚本。
git clone https://github.com/RhinoSecurityLabs/GCPBucketBrute.gitcd GCPBucketBrute/pip3 install -r requirements.txt 或 python3 -m pip install -r requirements.txt首先,确定枚举时使用的认证类型:用户账号、服务账号或未认证。如果您使用服务账号,请通过 -f/--service-account-credential-file-path 参数提供私钥文件路径。如果您使用用户账号,则不要提供认证参数。系统将提示您输入用户账号的访问令牌以访问 GCP API。如果您希望完全未认证扫描,请传递 -u/--unauthenticated 参数以隐藏认证提示。
python3 gcpbucketbrute.py -k test -u
python3 gcpbucketbrute.py -k test -f ../sa-priv-key.pem -o ./out.txt
python3 gcpbucketbrute.py -k test -s 10
-k/--keyword
--check
-k/--keyword 互斥,并接受单个字符串。它允许您检查特定存储桶的权限,而不是基于关键词生成排列组合列表。可以重复使用以检查多个存储桶。致谢:@BBerastegui--check-list
-k/--keyword 和 --check 互斥。它允许您检查文件中列出的多个存储桶的权限。存储桶名称应在文本文件中每行一个。要从标准输入读取,请将文件名指定为 -。-s/--subprocesses
-f/
--service-account-credential-file-path-u/--unauthenticated
-o/--out-file
-w/--wordlist