|
|||||||||||
|
Re: Custom session tokens and XSS
From: PortSwigger <mail(at)portswigger.net>
Date: Thu Aug 14 2003 - 10:16:34 EDT I disagree. > Regarding existing session stealing XSS attacks, there is really no
An alternative exploit would be to induce the user's browser to make a POST request (e.g. by sending them a suitable HTML-encoded email). Unless the attacker already knows what the user's token is, he cannot place it within the form data, and it will not be sent in the POST. Again, the application will not associate the request with any existing session, and so the user's token will not appear in the returned page. If the application requires that the POST includes _a_ valid session token, then the attacker can obtain one independently and place it in the form (a la session fixation), and the attacker's token will be submitted. Either way, the page returned by the application, in which the attacker's code will execute, will not contain the user's prior session token. So some common ways of exploiting XSS don't work here. In *some* applications, it could still be done. In an application which receives user data and makes that data visible to other users, a malicious user could submit a XSS payload to the application (within their own session) which would later be viewed by the victim -- the attacker's code would be executed within the victim's browser in a page also containing the victim's session token, which could then be stolen. But the attack would depend upon this (comparatively rare) functionality within the application. (How many online banks let you post messages to other users? :)) > Bottom line:
No -- it is more difficult to exploit XSS vulnerabilities *for the purpose of capturing the victim's existing session token* if the application stores the session token in a hidden form field than if the application uses conventional cookies.
Cheers,
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:54 EDT |
||||||||||
|
|||||||||||