<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
session	B-Protocol
hijacking	I-Protocol
,	O
sometimes	O
also	O
known	O
as	O
cookie	B-Protocol
hijacking	I-Protocol
,	O
is	O
the	O
exploitation	O
of	O
a	O
valid	O
computer	B-Protocol
session	I-Protocol
—	O
sometimes	O
also	O
called	O
a	O
session	O
key	O
—	O
to	O
gain	O
unauthorized	O
access	O
to	O
information	O
or	O
services	O
in	O
a	O
computer	O
system	O
.	O
</s>
<s>
In	O
particular	O
,	O
it	O
is	O
used	O
to	O
refer	O
to	O
the	O
theft	O
of	O
a	O
magic	O
cookie	B-Application
used	O
to	O
authenticate	O
a	O
user	O
to	O
a	O
remote	O
server	B-Application
.	O
</s>
<s>
It	O
has	O
particular	O
relevance	O
to	O
web	B-Operating_System
developers	I-Operating_System
,	O
as	O
the	O
HTTP	B-Application
cookies	I-Application
used	O
to	O
maintain	O
a	O
session	O
on	O
many	O
websites	O
can	O
be	O
easily	O
stolen	O
by	O
an	O
attacker	O
using	O
an	O
intermediary	O
computer	O
or	O
with	O
access	O
to	O
the	O
saved	O
cookies	B-Application
on	O
the	O
victim	O
's	O
computer	O
(	O
see	O
HTTP	B-Application
cookie	I-Application
theft	O
)	O
.	O
</s>
<s>
After	O
successfully	O
stealing	O
appropriate	O
session	O
cookies	B-Application
an	O
adversary	O
might	O
use	O
the	O
to	O
perform	O
session	B-Protocol
hijacking	I-Protocol
.	O
</s>
<s>
Cookie	B-Protocol
hijacking	I-Protocol
is	O
commonly	O
used	O
against	O
client	O
authentication	O
on	O
the	O
internet	O
.	O
</s>
<s>
Modern	O
web	O
browsers	O
use	O
cookie	B-Application
protection	O
mechanisms	O
to	O
protect	O
the	O
web	O
from	O
being	O
attacked	O
.	O
</s>
<s>
A	O
popular	O
method	O
is	O
using	O
source-routed	B-Protocol
IP	O
packets	O
.	O
</s>
<s>
HTTP	O
protocol	O
versions	O
0.8	O
and	O
0.9	O
lacked	O
cookies	B-Application
and	O
other	O
features	O
necessary	O
for	O
session	B-Protocol
hijacking	I-Protocol
.	O
</s>
<s>
Version	O
0.9beta	O
of	O
Mosaic	O
Netscape	O
,	O
released	O
on	O
October	O
13	O
,	O
1994	O
,	O
supported	O
cookies	B-Application
.	O
</s>
<s>
Early	O
versions	O
of	O
HTTP	O
1.0	O
did	O
have	O
some	O
security	O
weaknesses	O
relating	O
to	O
session	B-Protocol
hijacking	I-Protocol
,	O
but	O
they	O
were	O
difficult	O
to	O
exploit	O
due	O
to	O
the	O
vagaries	O
of	O
most	O
early	O
HTTP	O
1.0	O
servers	O
and	O
browsers	O
.	O
</s>
<s>
As	O
HTTP	O
1.0	O
has	O
been	O
designated	O
as	O
a	O
fallback	O
for	O
HTTP	O
1.1	O
since	O
the	O
early	O
2000s	O
—	O
and	O
as	O
HTTP	O
1.0	O
servers	O
are	O
all	O
essentially	O
HTTP	O
1.1	O
servers	O
the	O
session	B-Protocol
hijacking	I-Protocol
problem	O
has	O
evolved	O
into	O
a	O
nearly	O
permanent	O
security	O
risk	O
.	O
</s>
<s>
Webserver	B-Application
and	O
browser	O
state	O
machine	O
standardization	O
has	O
contributed	O
to	O
this	O
ongoing	O
security	O
problem	O
.	O
</s>
<s>
Session	B-Protocol
fixation	I-Protocol
,	O
where	O
the	O
attacker	O
sets	O
a	O
user	O
's	O
session	O
id	O
to	O
one	O
known	O
to	O
them	O
,	O
for	O
example	O
by	O
sending	O
the	O
user	O
an	O
email	O
with	O
a	O
link	O
that	O
contains	O
a	O
particular	O
session	O
id	O
.	O
</s>
<s>
Session	O
side	O
jacking	O
,	O
where	O
the	O
attacker	O
uses	O
packet	B-Protocol
sniffing	I-Protocol
to	O
read	O
network	O
traffic	O
between	O
two	O
parties	O
to	O
steal	O
the	O
session	O
cookie	B-Application
.	O
</s>
<s>
Many	O
websites	O
use	O
SSL	B-Protocol
encryption	I-Protocol
for	O
login	O
pages	O
to	O
prevent	O
attackers	O
from	O
seeing	O
the	O
password	O
,	O
but	O
do	O
not	O
use	O
encryption	O
for	O
the	O
rest	O
of	O
the	O
site	O
once	O
authenticated	O
.	O
</s>
<s>
This	O
allows	O
attackers	O
that	O
can	O
read	O
the	O
network	O
traffic	O
to	O
intercept	O
all	O
the	O
data	O
that	O
is	O
submitted	O
to	O
the	O
server	B-Application
or	O
web	O
pages	O
viewed	O
by	O
the	O
client	O
.	O
</s>
<s>
Since	O
this	O
data	O
includes	O
the	O
session	O
cookie	B-Application
,	O
it	O
allows	O
them	O
to	O
impersonate	O
the	O
victim	O
,	O
even	O
if	O
the	O
password	O
itself	O
is	O
not	O
compromised	O
.	O
</s>
<s>
Unsecured	O
Wi-Fi	B-Application
hotspots	I-Application
are	O
particularly	O
vulnerable	O
,	O
as	O
anyone	O
sharing	O
the	O
network	O
will	O
generally	O
be	O
able	O
to	O
read	O
most	O
of	O
the	O
web	O
traffic	O
between	O
other	O
nodes	O
and	O
the	O
access	B-Device
point	I-Device
.	O
</s>
<s>
Cross-site	O
scripting	O
,	O
where	O
the	O
attacker	O
tricks	O
the	O
user	O
's	O
computer	O
into	O
running	O
code	O
which	O
is	O
treated	O
as	O
trustworthy	O
because	O
it	O
appears	O
to	O
belong	O
to	O
the	O
server	B-Application
,	O
allowing	O
the	O
attacker	O
to	O
obtain	O
a	O
copy	O
of	O
the	O
cookie	B-Application
or	O
perform	O
other	O
operations	O
.	O
</s>
<s>
Malware	O
and	O
unwanted	B-Application
programs	I-Application
can	O
use	O
browser	O
hijacking	O
to	O
steal	O
a	O
browser	O
's	O
cookie	B-Application
files	I-Application
without	O
a	O
user	O
's	O
knowledge	O
,	O
and	O
then	O
perform	O
actions	O
(	O
like	O
installing	O
Android	O
apps	O
)	O
without	O
the	O
user	O
's	O
knowledge	O
.	O
</s>
<s>
An	O
attacker	O
with	O
physical	O
access	O
can	O
simply	O
attempt	O
to	O
steal	O
the	O
session	O
key	O
by	O
,	O
for	O
example	O
,	O
obtaining	O
the	O
file	O
or	O
memory	O
contents	O
of	O
the	O
appropriate	O
part	O
of	O
either	O
the	O
user	O
's	O
computer	O
or	O
the	O
server	B-Application
.	O
</s>
<s>
After	O
successfully	O
acquiring	O
appropriate	O
session	O
cookies	B-Application
an	O
adversary	O
might	O
leverage	O
the	O
to	O
perform	O
session	B-Protocol
hijacking	I-Protocol
.	O
</s>
<s>
In	O
October	O
2010	O
,	O
a	O
Mozilla	B-Application
Firefox	I-Application
extension	O
called	O
Firesheep	B-Operating_System
was	O
released	O
,	O
and	O
it	O
provided	O
an	O
easy	O
access	B-Device
point	I-Device
for	O
session	O
hijackers	O
to	O
attack	O
users	O
of	O
unencrypted	O
public	O
Wi-Fi	O
.	O
</s>
<s>
Websites	O
like	O
Facebook	B-Application
,	O
Twitter	B-Application
,	O
and	O
any	O
that	O
the	O
user	O
adds	O
to	O
their	O
preferences	O
allow	O
the	O
Firesheep	B-Operating_System
user	O
to	O
easily	O
access	O
private	O
information	O
from	O
cookies	B-Application
and	O
threaten	O
the	O
public	O
Wi-Fi	O
user	O
's	O
personal	O
property	O
.	O
</s>
<s>
Only	O
months	O
later	O
,	O
Facebook	B-Application
and	O
Twitter	B-Application
responded	O
by	O
offering	O
(	O
and	O
later	O
requiring	O
)	O
HTTP	B-Protocol
Secure	I-Protocol
throughout	O
.	O
</s>
<s>
An	O
app	O
named	O
WhatsApp	B-Application
Sniffer	O
was	O
made	O
available	O
on	O
Google	B-Application
Play	I-Application
in	O
May	O
2012	O
.	O
</s>
<s>
It	O
was	O
able	O
to	O
display	O
messages	O
from	O
other	O
WhatsApp	B-Application
users	O
connected	O
to	O
the	O
same	O
network	O
as	O
the	O
app	O
user	O
.	O
</s>
<s>
At	O
that	O
time	O
WhatsApp	B-Application
used	O
an	O
XMPP	B-Protocol
infrastructure	O
with	O
encryption	O
,	O
not	O
plain-text	O
communication	O
.	O
</s>
<s>
DroidSheep	O
is	O
a	O
simple	O
Android	O
tool	O
for	O
web	O
session	B-Protocol
hijacking	I-Protocol
(	O
sidejacking	O
)	O
.	O
</s>
<s>
The	O
apk	O
was	O
made	O
available	O
on	O
Google	B-Application
Play	I-Application
but	O
it	O
has	O
been	O
taken	O
down	O
by	O
Google	O
.	O
</s>
<s>
It	O
is	O
a	O
cross-platform	O
open-source	O
utility	O
based	O
on	O
the	O
Wireshark	B-Language
suite	O
which	O
can	O
monitor	O
wired	O
Ethernet	O
,	O
insecure	O
Wi-Fi	O
,	O
or	O
load	O
a	O
packet	B-Protocol
capture	I-Protocol
file	O
for	O
offline	O
analysis	O
.	O
</s>
<s>
Cookie	B-Application
Cadger	O
has	O
been	O
used	O
to	O
highlight	O
the	O
weaknesses	O
of	O
youth	O
team	O
sharing	O
sites	O
such	O
as	O
Shutterfly	O
(	O
used	O
by	O
AYSO	O
soccer	O
league	O
)	O
and	O
TeamSnap	O
.	O
</s>
<s>
Methods	O
to	O
prevent	O
session	B-Protocol
hijacking	I-Protocol
include	O
:	O
</s>
<s>
Encryption	O
of	O
the	O
data	O
traffic	O
passed	O
between	O
the	O
parties	O
by	O
using	O
SSL/TLS	B-Protocol
;	O
in	O
particular	O
the	O
session	O
key	O
(	O
though	O
ideally	O
all	O
traffic	O
for	O
the	O
entire	O
session	O
)	O
.	O
</s>
<s>
This	O
reduces	O
the	O
risk	O
that	O
an	O
attacker	O
could	O
simply	O
guess	O
a	O
valid	B-Protocol
session	I-Protocol
key	O
through	O
trial	O
and	O
error	O
or	O
brute	O
force	O
attacks	O
.	O
</s>
<s>
This	O
prevents	O
session	B-Protocol
fixation	I-Protocol
because	O
the	O
attacker	O
does	O
not	O
know	O
the	O
session	O
id	O
of	O
the	O
user	O
after	O
they	O
have	O
logged	O
in	O
.	O
</s>
<s>
For	O
instance	O
,	O
a	O
web	B-Application
server	I-Application
could	O
check	O
with	O
each	O
request	O
made	O
that	O
the	O
IP	O
address	O
of	O
the	O
user	O
matched	O
the	O
one	O
last	O
used	O
during	O
that	O
session	O
.	O
</s>
<s>
Alternatively	O
,	O
some	O
services	O
will	O
change	O
the	O
value	O
of	O
the	O
cookie	B-Application
with	O
each	O
and	O
every	O
request	O
.	O
</s>
<s>
This	O
dramatically	O
reduces	O
the	O
window	O
in	O
which	O
an	O
attacker	O
can	O
operate	O
and	O
makes	O
it	O
easy	O
to	O
identify	O
whether	O
an	O
attack	O
has	O
taken	O
place	O
,	O
but	O
can	O
cause	O
other	O
technical	O
problems	O
(	O
for	O
example	O
,	O
two	O
legitimate	O
,	O
closely	O
timed	O
requests	O
from	O
the	O
same	O
client	O
can	O
lead	O
to	O
a	O
token	O
check	O
error	O
on	O
the	O
server	B-Application
)	O
.	O
</s>
<s>
However	O
this	O
will	O
not	O
protect	O
against	O
attacks	O
such	O
as	O
Firesheep	B-Operating_System
.	O
</s>
