Post

Webverselabs Banyan Challenge XSS

Webverselabs Banyan Challenge XSS

Scenario :

Banyan coordinates community-garden plots. The search endpoint strips any space-prefixed on* attribute. The developer assumed all attribute boundaries are whitespace. HTML does not agree.

Solution :

image

We first browse the app like a normal user , see different endpoints, features then check Burp’s History for interesting Requests that we can tamper with .

/Crops :

image

Just a static page , no parameters, no useful information for us here.

/Workdays :

image

Same thing , nothing we can work with here.

/Reserve :

image

This one is interesting, let’s first submit a normal request :

image

Now first thing we can try is to inject a payload inside of the notes parameter , for this i used a simple XSS payload :

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

image

Weird “<script” got deleted , if we check the code :

image

Maybe script tags are blocked here , we can always use different ones :

1
<img src="" onerror=alert(window.origin)>

image

This time the entire thing got removed , if we check the code :

image

The moment it reached the space it deleted everything that came after, they also mentionned this in the description “The search endpoint strips any space-prefixed”.

We can try payloads that don’t use spaces or bypass space filters completely , and that won’t include script tags as well obviously .

image

I found these on Port Swigger’s Website , we can test them :

1
2
3
<img/onerror=alert(1) src=a>
<img/anyjunk/onerror=alert(1) src=a>
<img """><script>alert("alert(1)")</script>">

image

This worked from the first one .

image

Now 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.