Re: Session theft?
Johnny Elvers wrote:[color=blue]
> Dani CS wrote:
>[color=green]
> > The trick is not to use one _fixed_ session id during the wholesession,
> > but rather a _different_ session id for every client->server interaction
> > (i.e. every time a new page is fetched from the server). In other words,
> > multiple single-use session-ids for each session.
> >
> > A (single use) session id can be calculated from previos session ids and
> > a secret shared between client and server (e.g. the password used for
> > authentication of the user). This means that client and server must be
> > in sync. Along with each request, the client must send the next session
> > id that the server expects. This is why the 'back' button must not be
> > used: the session id of the previous page would be sent to the server,
> > but the server expects to get the session id for a new page. (I haven't
> > worked at fixing this at the moment.)
> >
> > The generated session ids must be difficult to guess just by looking at
> > previous session ids, so a one-way hash can be very useful (my
> > implementation uses MD5).
> >[/color]
>
> Why the clientside calculations really ? Why not just have the server
> generate a new UID that the client must use for the next page view ?[/color]
A session thief could retrieve the UID when it travels down to the
cliend, and use it right before the legitimate client uses it.
[color=blue]
>
> And if you store the generated session history you'll have some extra
> options.
>
> - Let's say a UID was stolen or sniffed. When the user tries to access
> the next page he will be asked to login, sending along the invalid UID.
> If login succeed it will take precedence over the latest used UID's and
> you'll have a track from the real users, former, invalid UID up to the
> latest.[/color]
I don't keep a history because I didn't see the need when I developed
this experiment, but the idea sounds good to me. Apart from that,
anytime that a user sends a wrong UID, they are presented the login
window again, just like you say.
[color=blue]
>
> - If you want to relax security a bit, you could allow the last or the
> last n sessions to be valid within a time span, allowing for Back button
> functionality.[/color]
This could work, but I'll keep searching for a while on ways to make the
'back' button usable. Maybe the onunload() javascript event can help.
[color=blue]
>
> /Johnny[/color]
Johnny Elvers wrote:[color=blue]
> Dani CS wrote:
>[color=green]
> > The trick is not to use one _fixed_ session id during the wholesession,
> > but rather a _different_ session id for every client->server interaction
> > (i.e. every time a new page is fetched from the server). In other words,
> > multiple single-use session-ids for each session.
> >
> > A (single use) session id can be calculated from previos session ids and
> > a secret shared between client and server (e.g. the password used for
> > authentication of the user). This means that client and server must be
> > in sync. Along with each request, the client must send the next session
> > id that the server expects. This is why the 'back' button must not be
> > used: the session id of the previous page would be sent to the server,
> > but the server expects to get the session id for a new page. (I haven't
> > worked at fixing this at the moment.)
> >
> > The generated session ids must be difficult to guess just by looking at
> > previous session ids, so a one-way hash can be very useful (my
> > implementation uses MD5).
> >[/color]
>
> Why the clientside calculations really ? Why not just have the server
> generate a new UID that the client must use for the next page view ?[/color]
A session thief could retrieve the UID when it travels down to the
cliend, and use it right before the legitimate client uses it.
[color=blue]
>
> And if you store the generated session history you'll have some extra
> options.
>
> - Let's say a UID was stolen or sniffed. When the user tries to access
> the next page he will be asked to login, sending along the invalid UID.
> If login succeed it will take precedence over the latest used UID's and
> you'll have a track from the real users, former, invalid UID up to the
> latest.[/color]
I don't keep a history because I didn't see the need when I developed
this experiment, but the idea sounds good to me. Apart from that,
anytime that a user sends a wrong UID, they are presented the login
window again, just like you say.
[color=blue]
>
> - If you want to relax security a bit, you could allow the last or the
> last n sessions to be valid within a time span, allowing for Back button
> functionality.[/color]
This could work, but I'll keep searching for a while on ways to make the
'back' button usable. Maybe the onunload() javascript event can help.
[color=blue]
>
> /Johnny[/color]
Comment