How can we prevent session hijacking in an asp.net mvc application? The following steps were performed by the testers to hijack the session - OWASP A2.
ASP.Net Session ID
of the admin userASP.Net Session ID
of the low-prev user with the that of the admin user.By doing the above steps, the low-prev user was able to access the admin areas of the app.
SSL (https)
.Secure
and HttpOnly
.Session_End
and Signout
.Still, I am able to reproduce the scenario explained above using Fiddler
. Could someone please help on ways to arrest the above issue.
Thanks.
I would argue that if someone were able to still the cookie, then she should be able to log in. The mitigation should be using short-lived cookies for sensitive resources, and require the user to re-enter her credentials before doing any sensitive data. For example, setting a password, granting permissions etc. Also, you should make it hard to still a cookie - which seems like you already did. Worth also adding Same-Site), and keeping your site secure.