Post

Webverselabs Challenge Sprocket-Line- Reflected XSS

Webverselabs Challenge Sprocket-Line- Reflected XSS

Scenario :

After a phishing near-miss, Sprocket Line’s owner hired someone to “add security.” He got one line of PHP that strips

Solution :

image

We first start by navigating the application just like a normal user, check different endpoints and features, we’re mainly looking for a spot to inject .

/Parts :

image

Just a static page showing us different products, nothing useful .

/Warranty :

image

Another static page , nothing useful for us :)

/Fit Calc :

image

Finally somewhere we can inject , first let’s send a normal request and check burp .

image

Just a simple GET request containing our parameter , and returning whatever we inserted back to us , let’s first try to inject a simple XSS payload :

1
<script>alert(window.origin)</script>

image

We see that our tags are removed automatically , and we only get the content inside of them reflected back to us . Maybe there is a filter for script tag, whenever we suspect that there is a filter for specific tags , we can try and use this list of Bypasses :

1
https://cheatsheetseries.owasp.org/cheatsheets/XSS_Filter_Evasion_Cheat_Sheet.html

For this one , any of the Bypasses should work since this is a pretty simple one :

image

I choosed this one :

1
<a href="jav&#x0D;ascript:alert('XSS');">Click Me</a>

image

Make sure you URL encode everything if you have space in your payload since the field doesn’t allow spaces .

If you can’t insert the payload directly :

image

Just insert anything and then intercept the request :

image

From there modify the request before forwarding it to the server :

image

Now if we go back to the app :

image

We see that our code was indeed executed , now if we click the “Click Me “ Botton , we fire our XSS .

image

Once the XSS is triggered we should get our flag :

image

That was all for this challenge. See you in the next one :)

This post is licensed under CC BY 4.0 by the author.