<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Learning_Path%2FSSRF</id>
	<title>Learning Path/SSRF - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Learning_Path%2FSSRF"/>
	<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Learning_Path/SSRF&amp;action=history"/>
	<updated>2026-04-21T14:45:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Learning_Path/SSRF&amp;diff=1163&amp;oldid=prev</id>
		<title>imported&gt;Aghanim at 20:33, 30 December 2021</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Learning_Path/SSRF&amp;diff=1163&amp;oldid=prev"/>
		<updated>2021-12-30T20:33:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[File:2021-12-image-53.png|thumb|https://payatu.com/blog/arjuns/a-basic-approach-to-ssrf]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is my notes from the Junior Pentesting course at TryHackMe. This course takes you through the basics and some advanced topics regarding penetration testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is an SSRF? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SSRF stands for Server-Side Request Forgery. It&amp;#039;s a vulnerability that allows a malicious user to cause the webserver to make an additional or edited HTTP request to the resource of the attacker&amp;#039;s choosing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Types of SSRF ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two types of SSRF vulnerability; the first is a regular SSRF where data is returned to the attacker&amp;#039;s screen. The second is a Blind SSRF vulnerability where an SSRF occurs, but no information is returned to the attacker&amp;#039;s screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What’s the impact? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A successful SSRF attack can result in any of the following: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Access to unauthorised areas.* Access to customer/organisational data.* Ability to Scale to internal networks.* Reveal authentication tokens/credentials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= SSRF Examples =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-54.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-55.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-56.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-57.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-58.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Finding an SSRF =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Potential SSRF vulnerabilities can be spotted in web applications in many different ways. Here is an example of four common places to look:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;When a full URL is used in a parameter in the address bar:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-59.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A hidden field in a form:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-60.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A partial URL such as just the hostname:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-61.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Or perhaps only the path of the URL:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2021-12-image-62.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these examples are easier to exploit than others, and this is where a lot of trial and error will be required to find a working payload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If working with a &amp;#039;&amp;#039;&amp;#039;blind SSRF&amp;#039;&amp;#039;&amp;#039; where no output is reflected back to you, you&amp;#039;ll need to use an external HTTP logging tool to monitor requests such as &amp;#039;&amp;#039;&amp;#039;requestbin.com&amp;#039;&amp;#039;&amp;#039;, your own HTTP server or Burp Suite&amp;#039;s Collaborator client.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Defeating Common SSRF Defenses =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deny List ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A Deny List is where all requests are accepted apart from resources specified in a list or matching a particular pattern. A Web Application may employ a deny list to protect sensitive endpoints, IP addresses or domains from being accessed by the public while still allowing access to other locations. A specific endpoint to restrict access is the localhost, which may contain server performance data or further sensitive information, so domain names such as localhost and &amp;#039;&amp;#039;&amp;#039;127.0.0.1 &amp;#039;&amp;#039;&amp;#039;would appear on a deny list. Attackers can bypass a Deny List by using alternative localhost references such as &amp;#039;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;0.0.0.0&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;0000&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;127.1, 127.*.*.*&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;2130706433, 017700000001&amp;#039;&amp;#039;&amp;#039; or subdomains that have a DNS record which resolves to the IP Address &amp;#039;&amp;#039;&amp;#039;127.0.0.1&amp;#039;&amp;#039;&amp;#039; such as &amp;#039;&amp;#039;&amp;#039;127.0.0.1.nip.io&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, in a cloud environment, it would be beneficial to block access to the IP address &amp;#039;&amp;#039;&amp;#039;169.254.169.254&amp;#039;&amp;#039;&amp;#039;, which contains metadata for the deployed cloud server, including possibly sensitive information. An attacker can bypass this by registering a subdomain on their own domain with a DNS record that points to the IP Address &amp;#039;&amp;#039;&amp;#039;169.254.169.254&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Allow List ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An allow list is where all requests get denied unless they appear on a list or match a particular pattern, such as a rule that an URL used in a parameter must begin with &amp;#039;&amp;#039;&amp;#039;https://website.thm.&amp;#039;&amp;#039;&amp;#039; An attacker could quickly circumvent this rule by creating a subdomain on an attacker&amp;#039;s domain name, such as &amp;#039;&amp;#039;&amp;#039;https://website.thm.attackers-domain.thm&amp;#039;&amp;#039;&amp;#039;. The application logic would now allow this input and let an attacker control the internal HTTP request.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Open Redirect ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An open redirect is an endpoint on the server where the website visitor gets automatically redirected to another website address. For example, the link &amp;#039;&amp;#039;&amp;#039;https://website.thm/link?url=https://tryhackme.com&amp;#039;&amp;#039;&amp;#039;. This endpoint was created to record the number of times visitors have clicked on this link for advertising/marketing purposes. But imagine there was a potential &amp;#039;&amp;#039;&amp;#039;SSRF &amp;#039;&amp;#039;&amp;#039;vulnerability with stringent rules which only allowed URLs beginning with &amp;#039;&amp;#039;&amp;#039;https://website.thm/&amp;#039;&amp;#039;&amp;#039;. An attacker could utilise the above feature to redirect the internal HTTP request to a domain of the attacker&amp;#039;s choice.&lt;br /&gt;
&lt;br /&gt;
[[Category:Learning Path]]&lt;br /&gt;
[[Category:TryHackMe]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aghanim</name></author>
	</entry>
</feed>