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.
- Login as a low-privilege user.
- Login as a admin user. (in a separate browser - from the same machine)
- Copied the
ASP.Net Session ID
of the admin user - Replaced the
ASP.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.
- The application is hosted with
SSL (https)
. - Cookies have been set to
Secure
andHttpOnly
. - Cookies are set to expire on
Session_End
andSignout
.
Still, I am able to reproduce the scenario explained above using Fiddler
. Could someone please help on ways to arrest the above issue.
Thanks.