<s>
A	O
"	O
return-to-libc	B-Language
"	O
attack	O
is	O
a	O
computer	O
security	O
attack	O
usually	O
starting	O
with	O
a	O
buffer	B-General_Concept
overflow	I-General_Concept
in	O
which	O
a	O
subroutine	O
return	B-Language
address	I-Language
on	O
a	O
call	B-General_Concept
stack	I-General_Concept
is	O
replaced	O
by	O
an	O
address	O
of	O
a	O
subroutine	O
that	O
is	O
already	O
present	O
in	O
the	O
process	B-Operating_System
executable	O
memory	O
,	O
bypassing	O
the	O
no-execute	B-General_Concept
bit	I-General_Concept
feature	O
(	O
if	O
present	O
)	O
and	O
ridding	O
the	O
attacker	O
of	O
the	O
need	O
to	O
inject	O
their	O
own	O
code	O
.	O
</s>
<s>
On	O
POSIX-compliant	O
operating	B-General_Concept
systems	I-General_Concept
the	B-Language
C	I-Language
standard	I-Language
library	I-Language
(	O
"	O
libc	B-Language
"	O
)	O
is	O
commonly	O
used	O
to	O
provide	O
a	O
standard	O
runtime	B-Device
environment	I-Device
for	O
programs	O
written	O
in	O
the	O
C	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
Although	O
the	O
attacker	O
could	O
make	O
the	O
code	O
return	O
anywhere	O
,	O
libc	B-Language
is	O
the	O
most	O
likely	O
target	O
,	O
as	O
it	O
is	O
almost	O
always	O
linked	O
to	O
the	O
program	O
,	O
and	O
it	O
provides	O
useful	O
calls	O
for	O
an	O
attacker	O
(	O
such	O
as	O
the	O
system	O
function	O
used	O
to	O
execute	O
shell	O
commands	O
)	O
.	O
</s>
<s>
A	O
non-executable	B-General_Concept
stack	O
can	O
prevent	O
some	O
buffer	B-General_Concept
overflow	I-General_Concept
exploitation	O
,	O
however	O
it	O
cannot	O
prevent	O
a	O
return-to-libc	B-Language
attack	I-Language
because	O
in	O
the	O
return-to-libc	B-Language
attack	I-Language
only	O
existing	O
executable	O
code	O
is	O
used	O
.	O
</s>
<s>
With	O
ASCII	O
armoring	O
,	O
all	O
the	O
system	O
libraries	O
(	O
e.g.	O
,	O
libc	B-Language
)	O
addresses	O
contain	O
a	O
NULL	O
byte	O
(	O
0x00	O
)	O
.	O
</s>
<s>
This	O
technique	O
is	O
similar	O
to	O
another	O
attack	O
known	O
as	O
return-to-plt	B-Language
where	O
,	O
instead	O
of	O
returning	O
to	O
libc	B-Language
,	O
the	O
attacker	O
uses	O
the	O
Procedure	O
Linkage	O
Table	O
(	O
PLT	O
)	O
functions	O
loaded	O
in	O
the	O
position-independent	B-Operating_System
code	I-Operating_System
(	O
e.g.	O
,	O
system	O
@plt	O
,	O
execve	O
@plt	O
,	O
sprintf	O
@plt	O
,	O
strcpy	O
@plt	O
)	O
.	O
</s>
<s>
Address	O
space	O
layout	O
randomization	O
(	O
ASLR	O
)	O
makes	O
this	O
type	O
of	O
attack	O
extremely	O
unlikely	O
to	O
succeed	O
on	O
64-bit	B-Device
machines	I-Device
as	O
the	O
memory	O
locations	O
of	O
functions	O
are	O
random	O
.	O
</s>
