I am learning on Tryhackme.com how to circumvent SSRF filter.
There is a website, let's assume it is test.com. test.com has two access points. First is /private
which is restricted, and /new-user-account
which can be accessed by users to update their avatars. The goal is to access /private
content
Avatars have links back to /assets
, and when I attempt to change the avatars link to /private
I get an error message says /private access is not allowed
.
However, the tutorial used a trick here and circumvented the filter.
"As you can see from the error message, the path cannot start with /private but don't worry, we've still got a trick up our sleeve to bypass this rule. We can use a directory traversal trick to reach our desired endpoint. Try setting the avatar value to x/../private"
I am just curious how this x/../private
stuff works? How does the server interpret x/../private
to /private
? This format does not make sense for me.