Thank you all for the response.
I tried option suggested by Sunil, by deleting the cookie explicitly
with expiration date.
Even I’m clearing the cache values by implementing the code suggested
by Rahul.
Still authentication cookie reply attack possible.
Following Microsoft link only provides more information about how to
ease cookie reply attacks but not the fix.
http://support.microsoft.com/kb/900111
Cookies reply attack possible only before the timeout period.
The timeout period attribute mentioned in my “web.config “file.
<authentication mode="Forms">
<forms loginUrl="~/Security/Login" timeout="20" />
</authentication>
The attack scenario would be- grabbing authentication cookie
(i.e. .ASPXAUTH) value and re-injecting the cookie after logout should
be done before timeout period.
Regards,
Sandesh.
On Apr 11, 10:33 pm, rahul sasi <
loverahul...@gmail.com> wrote:
> Hi,
>
> @Sandesh sunil has given the right solution you could implement the same fix
> using formsauthentication as its a better way, the problem you are facing is
> because when u do the formsauthentication.signout the cookies are not
> actually cleared and are still there. Session.abandon also have the same
> issue. So better to use a cookie expiration date on your cookies.
>
> Sometime force browsing is seen because of local browser cache issues. So
> that could be fixed by doing a no cahce response.
>
> This code using forms authentication and no cache would be a fix for your
> issues I suppose.
>
> Response.Cache.SetCacheability(HttpCacheability.NoCache);
> Response.Cache.SetNoStore();
> //No cache response, browser no wont cache the pages
>
> FormsAuthentication.SignOut();
> Session.Abandon();
> HttpCookie authentication_cookie = new
> HttpCookie(FormsAuthentication.FormsCookieName, "");
> authentication_cookie.Expires = DateTime.Now.AddYears(-1);
> Response.Cookies.Add(authentication_cookie);
>
> //You might do th same with session cookies if required.
>
> Just let us know if it worked.
>
> Regards.
>
> On Mon, Apr 11, 2011 at 5:45 PM, sunil yadav <
sunilyadav...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > Hi Sandesh,
>
> > Try deleting the cookie explicitly in you code when it logs out as shown in
> > the below code.
>
> > HttpCookie authCookie =
> > HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
>
> > if (authCookie != null)
> > {
> > HttpCookie cookie = new HttpCookie(authCookie.Name);
> > cookie.Expires.AddDays(-1D);
> > Response.Cookies.Add(cookie);
> > }
>
> > hope this helps.
>