News for hackers. Stuff that matters.
Re:Google's XSS game by johnadam on Thursday May 29, 2014 @06:25AM (#7815551)
How do you solve lv4?
Re:Google's XSS game by lazyjones on Thursday May 29, 2014 @06:42AM (#7815596)
' after the timer value, then proceed to construct a JS expression that will be evaluated before the call to setTimer ... Hint: '99'+moo() will evaluate nicely. Don't forgot the "open" the ' again.
Re:Google's XSS game by rhubarbcustard on Thursday May 29, 2014 @09:16AM (#7816042)
I can't figure how to close the quote after the '99 ? I realise that specifying ' on URL gets encoded to %27 but not sure how to turn that into the closing ' for startTime('99'); .....

Help!

Re:Google's XSS game by aetch on Thursday May 29, 2014 @09:18AM (#7816052)
Can you elaborate on this? I tried that and got "unexpected identifier" as a console error. Not sure how it works.
Re:Google's XSS game by tautvidas on Thursday May 29, 2014 @09:52AM (#7816198)
The point is to break out of the startTimer() function call, e.g.:

    startTimer('');foo();//');
The remaining '); can be commented out in order to not create any syntax errors.
Re:Google's XSS game by lazyjones on Thursday May 29, 2014 @09:55AM (#7816209)
SPOILER ALERT

I used this: 1'* alert()* '

(without the spaces needed for markdown here)

Re:Google's XSS game by rhubarbcustard on Thursday May 29, 2014 @10:24AM (#7816326)
Could you explain why the * works in there?
Re:Google's XSS game by lazyjones on Thursday May 29, 2014 @10:57AM (#7816522)
JS does automatic type conversion in this case, so it's syntactically correct to multiply a string with a number (or function result). We're just interested in the side-effects of alert(), so it doesn't really matter what kind of expression we use it in, as long as it parses correctly and causes alert() to be executed (evaluated).
Re:Google's XSS game by mariocarvalho on Sunday June 01, 2014 @12:39PM (#7829772)
Nice!
[deleted]
Re:Google's XSS game by lazyjones on Thursday May 29, 2014 @07:54AM (#7815732)
nope, OSX Safari
Re:Google's XSS game by namanaggarwal on Thursday May 29, 2014 @09:20AM (#7816057)
still not able to get :-(
Re:Google's XSS game by sourthyme on Thursday May 29, 2014 @10:06AM (#7816251)
Use the text input instead of the url.
Re:Google's XSS game by erid on Thursday May 29, 2014 @11:39AM (#7816772)
You could use %2b instead of + on the URL and it'll work, or just * as mentioned above.
Re:Google's XSS game by voxtex on Thursday May 29, 2014 @10:55AM (#7816509)
' + alert() + '

worked for me.

Re:Google's XSS game by codeman123 on Thursday May 29, 2014 @09:31AM (#7816098)
can't solve it either :-/
Re:Google's XSS game by jofo25 on Thursday May 29, 2014 @09:45AM (#7816165)
In the text input I put:

3') + alert('

Re:Google's XSS game by vsakos on Thursday May 29, 2014 @06:42AM (#7815597)
add your alert to the img onload