RE: XSS - Session hijacking
- From: stcheng@xxxxxxxxxxxxxxxxxxxx ("Steven Cheng")
- Date: Thu, 05 Feb 2009 04:12:15 GMT
Hi Rob,
As for the SessionID cookie, it is generated internally by the default
sessionIdManager. You can find the internal code logic through reflector.
Here is the code snippet extract from it:
======default SessionIdManager class======
private static HttpCookie CreateSessionCookie(string id)
{
HttpCookie cookie = new HttpCookie(Config.CookieName, id);
cookie.Path = "/";
cookie.HttpOnly = true;
return cookie;
}
=================
As you can see, it explicitly set HttpOnly to true. Also, I've tested the
session cookie via some javascript, and the javascript code cannot retrieve
it, that also indicate the cookie is httpOnly and protected from
client-script.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
--------------------
From: =?Utf-8?B?Um9iZXJ0IFNsYW5leQ==?= <Robert Slaney@xxxxxxxxxxxxx>
References: <7201D671-3F80-4311-BF98-A180FFF9ED9F@xxxxxxxxxxxxx>
Subject: RE: XSS - Session hijacking
Date: Wed, 4 Feb 2009 18:40:46 -0800
web.config, but
I think that it is set already, FireBug with firecookie shows the HttpOnly
attribute is on for ASPNET_SessionID.
"Robert Slaney" wrote:
note - using ASP.NET 2.0
I would like to set the httponly cookie flag on the asp.net sessionid
cookie. I know I can set this via the httpCookies element in
setI don't want to set all cookies to have this flag.
I have some cached static pages that use values from the cookies in
javascript so until I can reengineer these pages to remove this I cannot
the web.config in this way.
Does the default asp.net session provider have the ability to set it's
cookie to HttpOnly ?
Cheers...
Rob
.
- References:
- XSS - Session hijacking
- From: Robert Slaney
- RE: XSS - Session hijacking
- From: Robert Slaney
- XSS - Session hijacking
- Prev by Date: RE: XSS - Session hijacking
- Next by Date: Is it possible at all to secure an unencrypted website?
- Previous by thread: RE: XSS - Session hijacking
- Next by thread: Is it possible at all to secure an unencrypted website?
- Index(es):
Relevant Pages
|