Reputation: 37633
Today I got that question...
Is that a big problem when we store password like a plain text in Session of the ASP .NET MVC?
So is it possible that some hacker can get it somehow?
I need clear answer about it. If it is possible I need some explanation how it could be done. I need it to see possible risky of that approach.
Thank you!
Upvotes: 1
Views: 1613
Reputation: 52210
I presume that the password is being stored within session because the application uses it for something. A hacker is not likely to be able to read the password (without owning the web server) but it is possible to attack the session and take it over then use the password via the application.
Two attacks I can think of immediately:
Session fixation attack. Hacker starts his own session with your app, notes the session ID, then prepares a specially crafted email which when opened will cause a user to access your site using that session ID. When the user logs on, the hacker will have access to the same session because they have the ID in common.
Brute force. The session ID is a 120-bit number. A hacker can continuously poll your site with random session IDs until he finds one that works. It's difficult to guard against this form of attack because ASP does not distinguish between a falsified session ID and a real session ID that has expired.
Upvotes: 2
Reputation: 56162
It is absolutely insecure. There are several methods how attacker can steal user session, e.g. Session fixation, Session sidejacking, Cross-site scripting. You can start your research from Session hijacking article.
Upvotes: 2