Server-side request forgery (SSRF) describes situations where a web application is fetching a remote resource without validating the user-supplied URL. It allows an attacker to coerce the application to send a crafted request to an unexpected destination.
Attackers might also use this functionality to import untrusted data into code that expects to only read data from trusted sources, allowing them to circumvent input validation.
A URL or query string seen in a web browser’s address bar, when used as an input parameter, could be a perfect example of user input needing sanitization.
During code review, you came across a seemingly harmless REST web GET request:
C#Copy
string url = Request.Form["url"];
var client = new HttpClient();
HttpResponseMessage response = await client.GetAsync(url);
Without validating the supplied URL, an attacker can hijack the network connection and control the request schema by supplying ldap://, jar:// or file:// instead of https://. Furthermore, the POST method allows an attacker to force the application to send a crafted request to an unexpected destination.
iot internet of things training courses malaysia
Leave a Reply