php - Does regenerating a session ID help prevent fixation, hijacking or both? -
is true tactic of regenerating session id's useful prevent session hijacking via session fixation? if not, how regenerating id's prevent against session hijacking?
this popular answer recomendeds change session id because:
..if attacker hijack session don't want them able use long."
but if attacker has hijacked session won't receive new session id?
it'd race condition. you'd have 2+ users both sharing same session id. @ point code decides regenerate id, send new id 1 of users. if attacker lucks out , "hit" on gets regenerated id, they'll in clear , have total control on session now.
if actual user gets regenerated id, attacker left invalid session id, , they'll have try , hijack freshly regenerated id , start on again.
Comments
Post a Comment