Reputation: 2351
I am new to web development, and trying to get a hold on security issues. I went through this article on http://guides.rubyonrails.org/security.html these are some of the steps the author has mentioned how an attacker fixes session.
I dont understand couple of points.
Upvotes: 2
Views: 1445
Reputation: 37905
1) The attacker receives a session in steps 1&2 which is not logged in yet. This is the trap session. At step 5 the victim logs in thinking that the session id is new (and 'secret'). At the moment when the victim is logged in the attacker is able to re-use the 'secret' session id and effectively is logged in as well.
So to answer your question: the victim is made to login because the trap session is not logged in yet in order to trick the victim to login using this session id.
2) After explaining the steps of session fixation, the first counter measure (section 2.8) is to create a new session and abandon the old on after logging in. Exactly what your idea was!
Upvotes: 1