Situation
I am the responsible developer for an ASP.NET application that uses the "Membership" (username and password) authentication scheme. I am presented with the following report from a WebInspect scan:
WebInspect has found a session fixation vulnerability on the site. Session fixation allows an attacker to impersonate a user by abusing an authenticated session ID (SID).
Reproduction
I tried to reproduce the typical session fixation attack, using the guide on OWASP:
I retrieve the login page. When inspecting the cookies with Google Chrome's Developer Tools (F12), I get:
ASP.NET_SessionId
w4bce3a0e5j4fmxj3b0lqkw2
After authentication on the login page, I get an additional
.ASPXAUTH
F0B9C00FC624E3F2C0CD2EC9E5EF7D10D91A6D62A26BAEE67A38D0608198750A2428E1F5D7278DCE6312C32EE2788D6C79E8112EA35B2397DB84FBB2BE1DBDA815A304B12505D2B786B00038B1EB0BE854DBDAF13072AFEDB3A21E36A7BCD7CD0032A0BCE8E90ECEAFA5FF487D6D2E2C
while the session cookie stays the same (as preconditioned for a session fixation attack)
Attack: However, if steal/make up and fix only the
ASP.NET_SessionId
and inject it into another browser, the request is not authenticated. It is authenticated only after also stealing the.ASPXAUTH
cookie, which is only available AFTER login.
Conclusion
I come to the following conclusion:
While the typical precondition for a session fixation attack is met (non-changing session id), an attack will fail because of the missing, required additional .ASPXAUTH
cookie, provided only AFTER successful authentication.
Question
So, should I really change the session cookie after login? Will this only satisfy the WebInspect scan or is there a real value here?
Note: I am very likely having the exact scenario as in Session Fixation: A token and an id, but I am not asking whether it is vulnerable, but what I should do with regards to the report.