<s>
DNS	B-Protocol
rebinding	I-Protocol
is	O
a	O
method	O
of	O
manipulating	O
resolution	O
of	O
domain	O
names	O
that	O
is	O
commonly	O
used	O
as	O
a	O
form	O
of	O
computer	O
attack	O
.	O
</s>
<s>
In	O
theory	O
,	O
the	O
same-origin	B-Protocol
policy	I-Protocol
prevents	O
this	O
from	O
happening	O
:	O
client-side	O
scripts	O
are	O
only	O
allowed	O
to	O
access	O
content	O
on	O
the	O
same	O
host	O
that	O
served	O
the	O
script	O
.	O
</s>
<s>
Comparing	O
domain	O
names	O
is	O
an	O
essential	O
part	O
of	O
enforcing	O
this	O
policy	O
,	O
so	O
DNS	B-Protocol
rebinding	I-Protocol
circumvents	O
this	O
protection	O
by	O
abusing	O
the	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
(	O
DNS	B-Protocol
)	O
.	O
</s>
<s>
This	O
attack	O
can	O
be	O
used	O
to	O
breach	O
a	O
private	B-Protocol
network	I-Protocol
by	O
causing	O
the	O
victim	O
's	O
web	B-Application
browser	I-Application
to	O
access	O
computers	O
at	O
private	B-Protocol
IP	I-Protocol
addresses	I-Protocol
and	O
return	O
the	O
results	O
to	O
the	O
attacker	O
.	O
</s>
<s>
The	O
attacker	O
registers	O
a	O
domain	O
(	O
such	O
as	O
attacker.com	O
)	O
and	O
delegates	O
it	O
to	O
a	O
DNS	B-Protocol
server	I-Protocol
that	O
is	O
under	O
the	O
attacker	O
's	O
control	O
.	O
</s>
<s>
The	O
server	O
is	O
configured	O
to	O
respond	O
with	O
a	O
very	O
short	O
time	O
to	O
live	O
(	O
TTL	O
)	O
record	O
,	O
preventing	O
the	O
DNS	B-Protocol
response	O
from	O
being	O
cached	O
.	O
</s>
<s>
When	O
the	O
victim	O
browses	O
to	O
the	O
malicious	O
domain	O
,	O
the	O
attacker	O
's	O
DNS	B-Protocol
server	I-Protocol
first	O
responds	O
with	O
the	O
IP	B-Protocol
address	I-Protocol
of	O
a	O
server	O
hosting	O
the	O
malicious	O
client-side	O
code	O
.	O
</s>
<s>
For	O
instance	O
,	O
they	O
could	O
point	O
the	O
victim	O
's	O
browser	B-Application
to	O
a	O
website	O
that	O
contains	O
malicious	O
JavaScript	B-Language
or	O
Flash	B-Operating_System
scripts	O
that	O
are	O
intended	O
to	O
execute	O
on	O
the	O
victim	O
's	O
computer	O
.	O
</s>
<s>
These	O
are	O
permitted	O
by	O
the	O
same-origin	B-Protocol
policy	I-Protocol
.	O
</s>
<s>
However	O
,	O
when	O
the	O
victim	O
's	O
browser	B-Application
runs	O
the	O
script	O
it	O
makes	O
a	O
new	O
DNS	B-Protocol
request	O
for	O
the	O
domain	O
,	O
and	O
the	O
attacker	O
replies	O
with	O
a	O
new	O
IP	B-Protocol
address	I-Protocol
.	O
</s>
<s>
For	O
instance	O
,	O
they	O
could	O
reply	O
with	O
an	O
internal	B-Protocol
IP	I-Protocol
address	I-Protocol
or	O
the	O
IP	B-Protocol
address	I-Protocol
of	O
a	O
target	O
somewhere	O
else	O
on	O
the	O
Internet	O
.	O
</s>
<s>
The	O
following	O
techniques	O
attempt	O
to	O
prevent	O
DNS	B-Protocol
rebinding	I-Protocol
attacks	O
:	O
</s>
<s>
DNS	B-Protocol
servers	I-Protocol
in	O
the	O
chain	O
can	O
filter	O
out	O
private	B-Protocol
IP	I-Protocol
addresses	I-Protocol
and	O
loopback	O
IP	B-Protocol
addresses	I-Protocol
:	O
</s>
<s>
External	O
public	O
DNS	B-Protocol
servers	I-Protocol
(	O
e.g.	O
</s>
<s>
OpenDNS	B-Protocol
)	O
can	O
implement	O
DNS	B-Protocol
filtering	O
.	O
</s>
<s>
Local	O
system	B-Application
administrators	I-Application
can	O
configure	O
the	O
organization	O
's	O
local	O
nameserver(s )	O
to	O
block	O
the	O
resolution	O
of	O
external	O
names	O
into	O
internal	O
IP	B-Protocol
addresses	I-Protocol
.	O
</s>
<s>
A	O
firewall	B-Application
(	O
e.g.	O
</s>
<s>
dnswall	O
)	O
,	O
in	O
the	O
gateway	O
or	O
in	O
the	O
local	O
pc	O
,	O
can	O
filter	O
DNS	B-Protocol
replies	O
that	O
pass	O
through	O
it	O
,	O
discarding	O
local	O
addresses	O
.	O
</s>
<s>
Web	B-Application
browsers	I-Application
can	O
resist	O
DNS	B-Protocol
rebinding	I-Protocol
:	O
</s>
<s>
Web	B-Application
browsers	I-Application
can	O
implement	O
DNS	B-Protocol
pinning	O
:	O
the	O
IP	B-Protocol
address	I-Protocol
is	O
locked	O
to	O
the	O
value	O
received	O
in	O
the	O
first	O
DNS	B-Protocol
response	O
.	O
</s>
<s>
This	O
technique	O
may	O
block	O
some	O
legitimate	O
uses	O
of	O
Dynamic	B-Protocol
DNS	I-Protocol
,	O
and	O
may	O
not	O
work	O
against	O
all	O
attacks	O
.	O
</s>
<s>
However	O
,	O
it	O
is	O
important	O
to	O
fail-safe	O
(	O
stop	O
rendering	O
)	O
if	O
the	O
IP	B-Protocol
address	I-Protocol
does	O
change	O
,	O
because	O
using	O
an	O
IP	B-Protocol
address	I-Protocol
past	O
the	O
TTL	O
expiration	O
can	O
open	O
the	O
opposite	O
vulnerability	O
when	O
the	O
IP	B-Protocol
address	I-Protocol
has	O
legitimately	O
changed	O
and	O
the	O
expired	O
IP	B-Protocol
address	I-Protocol
may	O
now	O
be	O
controlled	O
by	O
an	O
attacker	O
.	O
</s>
<s>
The	O
NoScript	B-Operating_System
extension	O
for	O
Firefox	B-Application
includes	O
ABE	O
,	O
a	O
firewall-like	O
feature	O
inside	O
the	O
browser	B-Application
which	O
in	O
its	O
default	O
configuration	O
prevents	O
attacks	O
on	O
the	O
local	O
network	O
by	O
preventing	O
external	O
webpages	O
from	O
accessing	O
local	O
IP	B-Protocol
addresses	I-Protocol
.	O
</s>
<s>
Web	O
servers	O
can	O
reject	O
HTTP	B-Protocol
requests	I-Protocol
with	O
an	O
unrecognized	O
Host	B-Protocol
header	I-Protocol
.	O
</s>
