GCP - Storage Unauthenticated Enum

Impara l'hacking di AWS da zero a esperto con htARTE (HackTricks AWS Red Team Expert)!

Altri modi per supportare HackTricks:

Storage

Per ulteriori informazioni su Storage, controlla:

pageGCP - Storage Enum

Brute Force di Bucket Pubblici

Il formato di un URL per accedere a un bucket è https://storage.googleapis.com/<nome-bucket>.

I seguenti strumenti possono essere utilizzati per generare varianti del nome fornito e cercare bucket mal configurati con quei nomi:

Anche gli strumenti menzionati in:

pageGCP - Unauthenticated Enum & Access

Se scopri che puoi accedere a un bucket, potresti essere in grado di scalare ancora di più, controlla:

pageGCP - Public Buckets Privilege Escalation

Cerca Bucket Aperti nell'Account Corrente

Con lo script seguente raccolto da qui puoi trovare tutti i bucket aperti:

#!/bin/bash

############################
# Run this tool to find buckets that are open to the public anywhere
# in your GCP organization.
#
# Enjoy!
############################

for proj in $(gcloud projects list --format="get(projectId)"); do
echo "[*] scraping project $proj"
for bucket in $(gsutil ls -p $proj); do
echo "    $bucket"
ACL="$(gsutil iam get $bucket)"

all_users="$(echo $ACL | grep allUsers)"
all_auth="$(echo $ACL | grep allAuthenticatedUsers)"

if [ -z "$all_users" ]
then
:
else
echo "[!] Open to all users: $bucket"
fi

if [ -z "$all_auth" ]
then
:
else
echo "[!] Open to all authenticated users: $bucket"
fi
done
done
Impara l'hacking di AWS da zero a eroe con htARTE (HackTricks AWS Red Team Expert)!

Altri modi per supportare HackTricks:

Last updated