<s>
BREACH	B-Protocol
(	O
a	O
backronym	O
:	O
Browser	B-Protocol
Reconnaissance	I-Protocol
and	I-Protocol
Exfiltration	I-Protocol
via	I-Protocol
Adaptive	I-Protocol
Compression	I-Protocol
of	I-Protocol
Hypertext	I-Protocol
)	O
is	O
a	O
security	O
vulnerability	O
against	O
HTTPS	B-Protocol
when	O
using	O
HTTP	B-Protocol
compression	I-Protocol
.	O
</s>
<s>
BREACH	B-Protocol
is	O
built	O
based	O
on	O
the	O
CRIME	B-General_Concept
security	I-General_Concept
exploit	I-General_Concept
.	O
</s>
<s>
BREACH	B-Protocol
was	O
announced	O
at	O
the	O
August	O
2013	O
Black	O
Hat	O
conference	O
by	O
security	O
researchers	O
Angelo	O
Prado	O
,	O
Neal	O
Harris	O
and	O
Yoel	O
Gluck	O
.	O
</s>
<s>
While	O
the	O
CRIME	B-General_Concept
attack	I-General_Concept
was	O
presented	O
as	O
a	O
general	O
attack	O
that	O
could	O
work	O
effectively	O
against	O
a	O
large	O
number	O
of	O
protocols	O
,	O
only	O
exploits	O
against	O
SPDY	B-Protocol
request	O
compression	O
and	O
TLS	B-Protocol
compression	O
were	O
demonstrated	O
and	O
largely	O
mitigated	O
in	O
browsers	O
and	O
servers	O
.	O
</s>
<s>
The	O
CRIME	O
exploit	O
against	O
HTTP	B-Protocol
compression	I-Protocol
has	O
not	O
been	O
mitigated	O
at	O
all	O
,	O
even	O
though	O
the	O
authors	O
of	O
CRIME	O
have	O
warned	O
that	O
this	O
vulnerability	O
might	O
be	O
even	O
more	O
widespread	O
than	O
SPDY	B-Protocol
and	O
TLS	B-Protocol
compression	O
combined	O
.	O
</s>
<s>
BREACH	B-Protocol
is	O
an	O
instance	O
of	O
the	O
CRIME	B-General_Concept
attack	I-General_Concept
against	O
HTTP	B-Protocol
compression	I-Protocol
—	O
the	O
use	O
of	O
gzip	B-Application
or	O
DEFLATE	B-Algorithm
data	O
compression	O
algorithms	O
via	O
the	O
content-encoding	O
option	O
within	O
HTTP	B-Protocol
by	O
many	O
web	O
browsers	O
and	O
servers	O
.	O
</s>
<s>
Given	O
this	O
compression	O
oracle	O
,	O
the	O
rest	O
of	O
the	O
BREACH	B-Protocol
attack	O
follows	O
the	O
same	O
general	O
lines	O
as	O
the	O
CRIME	O
exploit	O
,	O
by	O
performing	O
an	O
initial	O
blind	O
brute-force	B-Algorithm
search	I-Algorithm
to	O
guess	O
a	O
few	O
bytes	O
,	O
followed	O
by	O
divide-and-conquer	B-Algorithm
search	O
to	O
expand	O
a	O
correct	O
guess	O
to	O
an	O
arbitrarily	O
large	O
amount	O
of	O
content	O
.	O
</s>
<s>
BREACH	B-Protocol
exploits	O
the	O
compression	O
in	O
the	O
underlying	O
HTTP	B-Protocol
protocol	I-Protocol
.	O
</s>
<s>
Therefore	O
,	O
turning	O
off	O
TLS	B-Protocol
compression	O
makes	O
no	O
difference	O
to	O
BREACH	B-Protocol
,	O
which	O
can	O
still	O
perform	O
a	O
chosen-plaintext	O
attack	O
against	O
the	O
HTTP	B-Protocol
payload	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
clients	O
and	O
servers	O
are	O
either	O
forced	O
to	O
disable	O
HTTP	B-Protocol
compression	I-Protocol
completely	O
(	O
thus	O
reducing	O
performance	O
)	O
,	O
or	O
to	O
adopt	O
workarounds	O
to	O
try	O
to	O
foil	O
BREACH	B-Protocol
in	O
individual	O
attack	O
scenarios	O
,	O
such	O
as	O
using	O
cross-site	B-Protocol
request	I-Protocol
forgery	I-Protocol
(	O
CSRF	B-Protocol
)	O
protection	O
.	O
</s>
<s>
Another	O
suggested	O
approach	O
is	O
to	O
disable	O
HTTP	B-Protocol
compression	I-Protocol
whenever	O
the	O
referrer	O
header	O
indicates	O
a	O
cross-site	O
request	O
,	O
or	O
when	O
the	O
header	O
is	O
not	O
present	O
.	O
</s>
<s>
Another	O
approach	O
is	O
to	O
add	O
padding	O
at	O
the	O
TLS	B-Protocol
,	O
HTTP	B-Protocol
header	O
,	O
or	O
payload	O
level	O
.	O
</s>
<s>
Around	O
2013	O
–	O
2014	O
,	O
there	O
was	O
an	O
IETF	O
draft	O
proposal	O
for	O
a	O
TLS	B-Protocol
extension	O
for	O
length-hiding	O
padding	O
that	O
,	O
in	O
theory	O
,	O
could	O
be	O
used	O
as	O
a	O
mitigation	O
against	O
this	O
attack	O
.	O
</s>
<s>
It	O
allows	O
the	O
actual	O
length	O
of	O
the	O
TLS	B-Protocol
payload	O
to	O
be	O
disguised	O
by	O
the	O
insertion	O
of	O
padding	O
to	O
round	O
it	O
up	O
to	O
a	O
fixed	O
set	O
of	O
lengths	O
,	O
or	O
to	O
randomize	O
the	O
external	O
length	O
,	O
thereby	O
decreasing	O
the	O
likelihood	O
of	O
detecting	O
small	O
changes	O
in	O
compression	O
ratio	O
that	O
is	O
the	O
basis	O
for	O
the	O
BREACH	B-Protocol
attack	O
.	O
</s>
<s>
A	O
very	O
effective	O
mitigation	O
is	O
HTB	O
(	O
Heal-the-BREACH	O
)	O
that	O
adds	O
random-sized	O
padding	O
to	O
compressed	O
data	O
,	O
providing	O
some	O
in	O
the	O
size	O
of	O
the	O
output	O
contents	O
.	O
</s>
<s>
This	O
randomness	O
delays	O
BREACH	B-Protocol
from	O
guessing	O
the	O
correct	O
characters	O
in	O
the	O
secret	O
token	O
by	O
a	O
factor	O
of	O
500	O
(	O
10-byte	O
max	O
)	O
to	O
500,000	O
(	O
100-byte	O
max	O
)	O
.	O
</s>
